Browse Source
okay fuck you microsoft
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/2815/head
crueter
3 months ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with
3 additions and
7 deletions
-
src/common/fs/path_util.cpp
-
src/common/fs/symlink.cpp
|
|
|
@ -166,12 +166,11 @@ public: |
|
|
|
GenerateEdenPath(EdenPath::TASDir, eden_path / TAS_DIR); |
|
|
|
GenerateEdenPath(EdenPath::IconsDir, eden_path / ICONS_DIR); |
|
|
|
|
|
|
|
//
|
|
|
|
#ifdef _WIN32
|
|
|
|
GenerateLegacyPath(EmuPath::RyujinxDir, GetAppDataRoamingDirectory() / RYUJINX_DIR); |
|
|
|
#else
|
|
|
|
// In Ryujinx's infinite wisdom, it places EVERYTHING in the config directory on UNIX
|
|
|
|
// This is incredibly stupid and violates a million XDG standards, but alas,
|
|
|
|
// This is incredibly stupid and violates a million XDG standards, but whatever
|
|
|
|
GenerateLegacyPath(EmuPath::RyujinxDir, GetDataDirectory("XDG_CONFIG_HOME") / RYUJINX_DIR); |
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@ -1,7 +1,6 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include "symlink.h"
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
@ -20,11 +19,9 @@ namespace Common::FS { |
|
|
|
|
|
|
|
bool CreateSymlink(const fs::path &from, const fs::path &to) |
|
|
|
{ |
|
|
|
// TODO: test this, + does it need symlink perms?
|
|
|
|
#ifdef _WIN32
|
|
|
|
return CreateSymbolicLinkW(to.wstring().c_str(), |
|
|
|
from.wstring().c_str(), |
|
|
|
SYMBOLIC_LINK_FLAG_DIRECTORY); |
|
|
|
const std::string command = fmt::format("mklink /J {} {}", to.string(), from.string()); |
|
|
|
return system(command.c_str()) == 0; |
|
|
|
#else
|
|
|
|
std::error_code ec; |
|
|
|
fs::create_directory_symlink(from, to, ec); |
|
|
|
|