mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-10 21:23:40 +01:00
MacOSX: Correctly detect newer versions of OSXFuse
This commit is contained in:
parent
b331668c06
commit
faf00ca1e0
24
src/Core/Unix/MacOSX/CoreMacOSX.cpp
Normal file → Executable file
24
src/Core/Unix/MacOSX/CoreMacOSX.cpp
Normal file → Executable file
@ -124,19 +124,21 @@ namespace VeraCrypt
|
||||
fuseVersionStringLength = MAXHOSTNAMELEN;
|
||||
if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
|
||||
{
|
||||
throw HigherFuseVersionRequired (SRC_POS);
|
||||
fuseVersionStringLength = MAXHOSTNAMELEN;
|
||||
if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
|
||||
{
|
||||
throw HigherFuseVersionRequired (SRC_POS);
|
||||
}
|
||||
}
|
||||
|
||||
// look for compatibility mode
|
||||
struct stat sb;
|
||||
if ((0 == stat("/usr/local/lib/libfuse.dylib", &sb)) && (0 == stat("/Library/Frameworks/MacFUSE.framework/MacFUSE", &sb)))
|
||||
{
|
||||
bIsOSXFuse = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// look for compatibility mode
|
||||
struct stat sb;
|
||||
if ((0 == stat("/usr/local/lib/libfuse.dylib", &sb)) && (0 == stat("/Library/Frameworks/MacFUSE.framework/MacFUSE", &sb)))
|
||||
{
|
||||
bIsOSXFuse = true;
|
||||
}
|
||||
else
|
||||
throw HigherFuseVersionRequired (SRC_POS);
|
||||
}
|
||||
throw HigherFuseVersionRequired (SRC_POS);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user