mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user