From 7d39e836553d662b877655d2ef72e133a0d7ec74 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 7 Aug 2020 13:15:23 +0200 Subject: Linux: Fix detection of available filesystem formatters --- src/Core/VolumeCreator.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/Core/VolumeCreator.h b/src/Core/VolumeCreator.h index 22956451..77a8e05a 100644 --- a/src/Core/VolumeCreator.h +++ b/src/Core/VolumeCreator.h @@ -108,6 +108,18 @@ namespace VeraCrypt bRet = true; } + catch (ExecutedProcessFailed& epe) + { + // only permission error is accepted in case of failure of the command + if (epe.GetExitCode () == EPERM || epe.GetExitCode () == EACCES) + bRet = true; + } + catch (SystemException& se) + { + // if a permission error occured, then we consider that the command exists + if (se.GetErrorCode () == EPERM || se.GetErrorCode () == EACCES) + bRet = true; + } catch (exception &e) { } -- cgit v1.2.3