VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main')
-rw-r--r--src/Main/TextUserInterface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 21d13a6f..b147a3d4 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -652,7 +652,12 @@ namespace VeraCrypt
{
uint64 AvailableDiskSpace = 0;
wxLongLong diskSpace = 0;
- if (wxGetDiskSpace (wxFileName (wstring (options->Path)).GetPath(), nullptr, &diskSpace))
+ wxString parentDir = wxFileName (wstring (options->Path)).GetPath();
+ if (parentDir.IsEmpty())
+ {
+ parentDir = wxT(".");
+ }
+ if (wxDirExists(parentDir) && wxGetDiskSpace (parentDir, nullptr, &diskSpace))
{
AvailableDiskSpace = (uint64) diskSpace.GetValue ();
if (maxVolumeSize > AvailableDiskSpace)