macOS: Use correct Disk Utility location when "check filesystem" is ran (#1273)

This commit is contained in:
Jertzukka 2023-12-11 10:07:37 +02:00 committed by GitHub
parent ff93a6021f
commit 87a9508fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}