diff options
author | Jertzukka <Jertzukka@gmail.com> | 2023-12-11 10:07:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 09:07:37 +0100 |
commit | 87a9508fddb1656206188318365783e1a2d3e635 (patch) | |
tree | 744dde615cd432a2e87591b882c8a72afa7f9c45 | |
parent | ff93a6021fb744466661b666123dda96ecef5aba (diff) | |
download | VeraCrypt-87a9508fddb1656206188318365783e1a2d3e635.tar.gz VeraCrypt-87a9508fddb1656206188318365783e1a2d3e635.zip |
macOS: Use correct Disk Utility location when "check filesystem" is ran (#1273)
-rw-r--r-- | src/Core/Unix/MacOSX/CoreMacOSX.cpp | 8 |
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); } |