diff options
Diffstat (limited to 'src/Platform/Unix/FilesystemPath.cpp')
-rw-r--r-- | src/Platform/Unix/FilesystemPath.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Platform/Unix/FilesystemPath.cpp b/src/Platform/Unix/FilesystemPath.cpp index 674b395b..1230c2aa 100644 --- a/src/Platform/Unix/FilesystemPath.cpp +++ b/src/Platform/Unix/FilesystemPath.cpp @@ -15,7 +15,7 @@ #include "Platform/StringConverter.h" #include <stdio.h> #include <sys/stat.h> -#if !defined(__FreeBSD__) && !defined(__APPLE__) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__OpenBSD__) #include <sys/sysmacros.h> #endif @@ -107,8 +107,11 @@ namespace VeraCrypt string pathStr = StringConverter::ToSingle (Path); size_t p = pathStr.rfind ("s"); - if (p == string::npos) - throw PartitionDeviceRequired (SRC_POS); + if (p == string::npos) { + p = pathStr.rfind ("p"); + if (p == string::npos) + throw PartitionDeviceRequired (SRC_POS); + } path = pathStr.substr (0, p); #elif defined (TC_SOLARIS) |