also don't try to save if there's no folder to sync to
This commit is contained in:
parent
d25102a9c8
commit
8b59c73c01
|
@ -949,7 +949,10 @@ bool FATStorage::Load(std::string filename, u64 size, std::string sourcedir)
|
||||||
if (hasdir)
|
if (hasdir)
|
||||||
{
|
{
|
||||||
if (!fs::is_directory(fs::u8path(sourcedir)))
|
if (!fs::is_directory(fs::u8path(sourcedir)))
|
||||||
|
{
|
||||||
hasdir = false;
|
hasdir = false;
|
||||||
|
SourceDir = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'auto' size management: (size=0)
|
// 'auto' size management: (size=0)
|
||||||
|
@ -1082,6 +1085,11 @@ bool FATStorage::Load(std::string filename, u64 size, std::string sourcedir)
|
||||||
|
|
||||||
bool FATStorage::Save()
|
bool FATStorage::Save()
|
||||||
{
|
{
|
||||||
|
if (SourceDir.empty())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
FF_File = Platform::OpenLocalFile(FilePath.c_str(), "r+b");
|
FF_File = Platform::OpenLocalFile(FilePath.c_str(), "r+b");
|
||||||
if (!FF_File)
|
if (!FF_File)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue