Skip to content

Commit

Permalink
Also check that portable is a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
capitalistspz committed Dec 29, 2024
1 parent 3b182be commit 8c34745
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/CemuApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void CemuApp::DeterminePaths(std::set<fs::path>& failedWriteAccess) // for Windo
fs::path portablePath = exePath.parent_path() / "portable";
data_path = exePath.parent_path(); // the data path is always the same as the exe path
#ifdef CEMU_ALLOW_PORTABLE
if (fs::exists(portablePath, ec))
if (fs::is_directory(portablePath, ec))
{
isPortable = true;
user_data_path = config_path = cache_path = portablePath;
Expand Down Expand Up @@ -132,7 +132,7 @@ void CemuApp::DeterminePaths(std::set<fs::path>& failedWriteAccess) // for Linux
portablePath = exePath.parent_path() / "portable";
}
#ifdef CEMU_ALLOW_PORTABLE
if (fs::exists(portablePath, ec))
if (fs::is_directory(portablePath, ec))
{
isPortable = true;
user_data_path = config_path = cache_path = portablePath;
Expand Down Expand Up @@ -174,8 +174,8 @@ void CemuApp::DeterminePaths(std::set<fs::path>& failedWriteAccess) // for MacOS
// If run from an app bundle, use its parent directory
fs::path appPath = exePath.parent_path().parent_path().parent_path();
fs::path portablePath = appPath.extension() == ".app" ? appPath.parent_path() / "portable" : exePath.parent_path() / "portable";
#ifdef CEMU_ALLOW_PORTABLE
if (fs::exists(portablePath, ec))
#ifdef CEMU_ALLOW_PORTABLE
if (fs::is_directory(portablePath, ec))
{
isPortable = true;
user_data_path = config_path = cache_path = portablePath;
Expand Down

0 comments on commit 8c34745

Please sign in to comment.