filesystem restructure work.

Add mount/unmountCommonPath, mount/unmountFullPath, getFullCommonPath.

Reimplement identity and save directory code in terms of new commonpath code.

Add internal createRealDirectory function (not exposed, currently).
This commit is contained in:
Alex Szpakowski
2021-01-01 16:29:40 -04:00
parent f00f5cb51a
commit f151190548
8 changed files with 330 additions and 229 deletions
+1 -2
View File
@@ -69,14 +69,13 @@ bool File::open(Mode mode)
throw love::Exception("Could not open file %s. Does not exist.", filename.c_str());
// Check whether the write directory is set.
if ((mode == MODE_APPEND || mode == MODE_WRITE) && (PHYSFS_getWriteDir() == nullptr) && !setupWriteDirectory())
if ((mode == MODE_APPEND || mode == MODE_WRITE) && !setupWriteDirectory())
throw love::Exception("Could not set write directory.");
// File already open?
if (file != nullptr)
return false;
PHYSFS_getLastErrorCode();
PHYSFS_File *handle = nullptr;
switch (mode)