diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-10-28 23:45:14 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2021-10-28 23:45:14 +0200 |
commit | d25102a9c8fb30977dbc7df069bb80610bd6eed6 (patch) | |
tree | 32775a44bad064368156a5d2e319c5f3834f1f26 /src | |
parent | c532059cd33eb594fb30302abf02822496d3389c (diff) |
don't explode if the folder-sync path points to a non-existing folder
Diffstat (limited to 'src')
-rw-r--r-- | src/FATStorage.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FATStorage.cpp b/src/FATStorage.cpp index b59f502..07ef256 100644 --- a/src/FATStorage.cpp +++ b/src/FATStorage.cpp @@ -58,7 +58,7 @@ bool FATStorage::Open() { return false; } - + return true; } @@ -946,6 +946,11 @@ bool FATStorage::Load(std::string filename, u64 size, std::string sourcedir) SourceDir = sourcedir; bool hasdir = !sourcedir.empty(); + if (hasdir) + { + if (!fs::is_directory(fs::u8path(sourcedir))) + hasdir = false; + } // 'auto' size management: (size=0) // * if an index exists: the size from the index is used |