VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Unix/MacOSX
diff options
context:
space:
mode:
authorJertzukka <Jertzukka@gmail.com>2023-12-11 10:07:37 +0200
committerGitHub <noreply@github.com>2023-12-11 09:07:37 +0100
commit87a9508fddb1656206188318365783e1a2d3e635 (patch)
tree744dde615cd432a2e87591b882c8a72afa7f9c45 /src/Core/Unix/MacOSX
parentff93a6021fb744466661b666123dda96ecef5aba (diff)
downloadVeraCrypt-87a9508fddb1656206188318365783e1a2d3e635.tar.gz
VeraCrypt-87a9508fddb1656206188318365783e1a2d3e635.zip
macOS: Use correct Disk Utility location when "check filesystem" is ran (#1273)
Diffstat (limited to 'src/Core/Unix/MacOSX')
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.cpp b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
index b596e6e8..dde0d949 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.cpp
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
@@ -107,7 +107,13 @@ namespace VeraCrypt
void CoreMacOSX::CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair) const
{
list <string> args;
- args.push_back ("/Applications/Utilities/Disk Utility.app");
+ struct stat sb;
+
+ if (stat("/Applications/Utilities/Disk Utility.app", &sb) == 0)
+ args.push_back ("/Applications/Utilities/Disk Utility.app");
+ else
+ args.push_back ("/System/Applications/Utilities/Disk Utility.app");
+
Process::Execute ("open", args);
}