diff options
author | Travis Howell | 2009-07-10 23:40:21 +0000 |
---|---|---|
committer | Travis Howell | 2009-07-10 23:40:21 +0000 |
commit | 0577bee93893a55be1b2a067ec18f3c8ad462358 (patch) | |
tree | fafa1dcfe20233fcd2be7bfd4483fb27f91503ca /backends | |
parent | 70c138651dc71f886a4314943c4e9a753dc44607 (diff) | |
parent | 272e9487aaab6119fd643c3443fddbdfedb2f73e (diff) | |
download | scummvm-rg350-0577bee93893a55be1b2a067ec18f3c8ad462358.tar.gz scummvm-rg350-0577bee93893a55be1b2a067ec18f3c8ad462358.tar.bz2 scummvm-rg350-0577bee93893a55be1b2a067ec18f3c8ad462358.zip |
Merged revisions 42322,42328,42345-42346,42354-42358 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r42322 | dreammaster | 2009-07-10 10:49:13 +1000 (Fri, 10 Jul 2009) | 1 line
Changed the status of the Tinsel engine to be enabled by default
........
r42328 | sev | 2009-07-10 18:40:44 +1000 (Fri, 10 Jul 2009) | 2 lines
Mention cruise support
........
r42345 | thebluegr | 2009-07-11 04:53:40 +1000 (Sat, 11 Jul 2009) | 1 line
Applied patch #2819665 - "SCI: cell palette fix for QfG3/SQ5/etc."
........
r42346 | sev | 2009-07-11 05:06:24 +1000 (Sat, 11 Jul 2009) | 2 lines
This is 1.0.0svn
........
r42354 | drmccoy | 2009-07-11 07:49:47 +1000 (Sat, 11 Jul 2009) | 1 line
Fixing mismatched delete
........
r42355 | drmccoy | 2009-07-11 08:11:36 +1000 (Sat, 11 Jul 2009) | 1 line
Mention the Gob savegame format change and change the version from 0.14.0 to 1.0.0 there too
........
r42356 | Hkz | 2009-07-11 08:13:27 +1000 (Sat, 11 Jul 2009) | 1 line
tinsel: proper detection entry for Discworld 1 Italian only CD
........
r42357 | wjpalenstijn | 2009-07-11 08:29:25 +1000 (Sat, 11 Jul 2009) | 4 lines
Recreate FSNode after calling checkPath since checkPath may
have created the directory the FSNode points to, invalidating
its cached metadata. In the future, it might be nice to add
a FSNode::rescan() function for this? This fixes #2793187 .
........
r42358 | sev | 2009-07-11 08:46:36 +1000 (Sat, 11 Jul 2009) | 5 lines
Restored several files after the version update.
.in files are THE sources, and have to be modified, not the files generated
from them.
........
svn-id: r42359
Diffstat (limited to 'backends')
-rw-r--r-- | backends/saves/default/default-saves.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 69af78404d..70b9977d8f 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -55,11 +55,14 @@ void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) { } Common::StringList DefaultSaveFileManager::listSavefiles(const Common::String &pattern) { - Common::FSNode savePath(getSavePath()); - checkPath(savePath); + Common::String savePathName = getSavePath(); + checkPath(Common::FSNode(savePathName)); if (getError() != Common::kNoError) return Common::StringList(); + // recreate FSNode since checkPath may have changed/created the directory + Common::FSNode savePath(savePathName); + Common::FSDirectory dir(savePath); Common::ArchiveMemberList savefiles; Common::StringList results; @@ -76,11 +79,14 @@ Common::StringList DefaultSaveFileManager::listSavefiles(const Common::String &p Common::InSaveFile *DefaultSaveFileManager::openForLoading(const Common::String &filename) { // Ensure that the savepath is valid. If not, generate an appropriate error. - Common::FSNode savePath(getSavePath()); - checkPath(savePath); + Common::String savePathName = getSavePath(); + checkPath(Common::FSNode(savePathName)); if (getError() != Common::kNoError) return 0; + // recreate FSNode since checkPath may have changed/created the directory + Common::FSNode savePath(savePathName); + Common::FSNode file = savePath.getChild(filename); if (!file.exists()) return 0; @@ -93,11 +99,14 @@ Common::InSaveFile *DefaultSaveFileManager::openForLoading(const Common::String Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String &filename) { // Ensure that the savepath is valid. If not, generate an appropriate error. - Common::FSNode savePath(getSavePath()); - checkPath(savePath); + Common::String savePathName = getSavePath(); + checkPath(Common::FSNode(savePathName)); if (getError() != Common::kNoError) return 0; + // recreate FSNode since checkPath may have changed/created the directory + Common::FSNode savePath(savePathName); + Common::FSNode file = savePath.getChild(filename); // Open the file for saving @@ -107,13 +116,14 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String } bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) { - clearError(); - - Common::FSNode savePath(getSavePath()); - checkPath(savePath); + Common::String savePathName = getSavePath(); + checkPath(Common::FSNode(savePathName)); if (getError() != Common::kNoError) return false; + // recreate FSNode since checkPath may have changed/created the directory + Common::FSNode savePath(savePathName); + Common::FSNode file = savePath.getChild(filename); // FIXME: remove does not exist on all systems. If your port fails to |