MacOSX: Correctly detect newer versions of OSXFuse

This commit is contained in:
Mounir IDRASSI 2016-02-21 00:47:48 +01:00
parent b331668c06
commit faf00ca1e0

8
src/Core/Unix/MacOSX/CoreMacOSX.cpp Normal file → Executable file
View File

@ -123,11 +123,14 @@ namespace VeraCrypt
{
fuseVersionStringLength = MAXHOSTNAMELEN;
if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
fuseVersionStringLength = MAXHOSTNAMELEN;
if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
throw HigherFuseVersionRequired (SRC_POS);
}
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)))
@ -136,7 +139,6 @@ namespace VeraCrypt
}
else
throw HigherFuseVersionRequired (SRC_POS);
}
}