VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/GraphicUserInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/GraphicUserInterface.cpp')
-rw-r--r--src/Main/GraphicUserInterface.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp
index 1cb62671..b8098e95 100644
--- a/src/Main/GraphicUserInterface.cpp
+++ b/src/Main/GraphicUserInterface.cpp
@@ -826,6 +826,19 @@ namespace VeraCrypt
return volume;
}
+
+ // check if the volume path exists using stat function. Only ENOENT error is handled to exclude permission denied error
+ struct stat statBuf;
+ if (stat (string (*options.Path).c_str(), &statBuf) != 0)
+ {
+ if (errno == ENOENT)
+ {
+ SystemException ex (SRC_POS);
+ ShowError (ex);
+ return volume;
+ }
+ }
+
try
{
if ((!options.Password || options.Password->IsEmpty())