From fdd0e8cf90b561986f49b59e3ba69d7c9aea951c Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Tue, 31 Dec 2024 11:29:18 +0100 Subject: [PATCH] Add support of macOS Parallels shared drive --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 13a9a3e..8c41520 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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