diff options
Diffstat (limited to 'src/Main/TextUserInterface.cpp')
-rw-r--r-- | src/Main/TextUserInterface.cpp | 7 |
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) |