Browse Source

okay fuck you microsoft

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/2815/head
crueter 3 months ago
parent
commit
3d4b3f80c4
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 3
      src/common/fs/path_util.cpp
  2. 7
      src/common/fs/symlink.cpp

3
src/common/fs/path_util.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

7
src/common/fs/symlink.cpp

@ -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);

Loading…
Cancel
Save