mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Merge pull request #1313 from kiwix/parrallels-shared-folder-support
Parrallels shared folder support
This commit is contained in:
commit
01f5ce0b6f
@ -17,9 +17,17 @@
|
|||||||
bool wasAppStartedFromARemoteDrive()
|
bool wasAppStartedFromARemoteDrive()
|
||||||
{
|
{
|
||||||
const std::string exePath = kiwix::getExecutablePath();
|
const std::string exePath = kiwix::getExecutablePath();
|
||||||
|
|
||||||
|
// Usual mounting point for Windows Network Drives
|
||||||
if ( exePath.substr(0, 2) == "\\\\" )
|
if ( exePath.substr(0, 2) == "\\\\" )
|
||||||
return true;
|
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;
|
return GetDriveTypeA(exePath.substr(0, 3).c_str()) == DRIVE_REMOTE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user