From 87a9508fddb1656206188318365783e1a2d3e635 Mon Sep 17 00:00:00 2001 From: Jertzukka Date: Mon, 11 Dec 2023 10:07:37 +0200 Subject: macOS: Use correct Disk Utility location when "check filesystem" is ran (#1273) --- src/Core/Unix/MacOSX/CoreMacOSX.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 mountedVolume, bool repair) const { list 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); } -- cgit v1.2.3