diff options
Diffstat (limited to 'src/yuzu/configuration/configure_profile_manager.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_profile_manager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index d61b5e29b1..f5881e58dc 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp @@ -12,7 +12,7 @@ #include <QTreeView> #include <QVBoxLayout> #include "common/assert.h" -#include "common/file_util.h" +#include "common/fs/path_util.h" #include "common/settings.h" #include "common/string_util.h" #include "core/core.h" @@ -34,9 +34,10 @@ constexpr std::array<u8, 107> backup_jpeg{ }; QString GetImagePath(Common::UUID uuid) { - const auto path = Common::FS::GetUserPath(Common::FS::UserPath::NANDDir) + - "/system/save/8000000000000010/su/avators/" + uuid.FormatSwitch() + ".jpg"; - return QString::fromStdString(path); + const auto path = + Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / + fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormatSwitch()); + return QString::fromStdString(Common::FS::PathToUTF8String(path)); } QString GetAccountUsername(const Service::Account::ProfileManager& manager, Common::UUID uuid) { @@ -281,8 +282,8 @@ void ConfigureProfileManager::SetUserImage() { return; } - const auto raw_path = QString::fromStdString( - Common::FS::GetUserPath(Common::FS::UserPath::NANDDir) + "/system/save/8000000000000010"); + const auto raw_path = QString::fromStdString(Common::FS::PathToUTF8String( + Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000010")); const QFileInfo raw_info{raw_path}; if (raw_info.exists() && !raw_info.isDir() && !QFile::remove(raw_path)) { QMessageBox::warning(this, tr("Error deleting file"), |