Skip to content

Commit

Permalink
Merge pull request #1313 from kiwix/parrallels-shared-folder-support
Browse files Browse the repository at this point in the history
Parrallels shared folder support
  • Loading branch information
kelson42 authored Jan 5, 2025
2 parents 7295e5b + fdd0e8c commit 01f5ce0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
bool wasAppStartedFromARemoteDrive()
{
const std::string exePath = kiwix::getExecutablePath();

// Usual mounting point for Windows Network Drives
if ( exePath.substr(0, 2) == "\\\\" )
return true;

// Support macOS Parallels shared folders.
// See https://kb.parallels.com/130138
if ( exePath.substr(0, 7) == "C:\\Mac\\" )
return true;

// Last chance to identify as remote drive
return GetDriveTypeA(exePath.substr(0, 3).c_str()) == DRIVE_REMOTE;
}
#endif
Expand Down

0 comments on commit 01f5ce0

Please sign in to comment.