diff options
author | Nicola Mettifogo | 2007-09-19 08:40:12 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-19 08:40:12 +0000 |
commit | 258901bab96f0050385a9912c8ea0fe2a41b2d6f (patch) | |
tree | a3ae8675b679c9f3b58ac8d97c79369502ea23c1 /backends/saves/default | |
parent | a89694c0d61a75a960f5bec6c498659c988401cc (diff) | |
download | scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.gz scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.tar.bz2 scummvm-rg350-258901bab96f0050385a9912c8ea0fe2a41b2d6f.zip |
Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
Diffstat (limited to 'backends/saves/default')
-rw-r--r-- | backends/saves/default/default-saves.cpp | 19 | ||||
-rw-r--r-- | backends/saves/default/default-saves.h | 1 |
2 files changed, 9 insertions, 11 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index f4742f15a0..702b404434 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -25,7 +25,6 @@ #if !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) -#include "common/stdafx.h" #include "common/savefile.h" #include "common/util.h" #include "common/fs.h" @@ -119,13 +118,13 @@ Common::StringList DefaultSaveFileManager::listSavefiles(const char *regex) { FSList savefiles; Common::StringList results; Common::String search(regex); - + if (savePath.lookupFile(savefiles, savePath, search, false, true)) { for (FSList::const_iterator file = savefiles.begin(); file != savefiles.end(); file++) { results.push_back(file->getPath()); } } - + return results; } @@ -148,11 +147,11 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) // Ensure that the savepath exists and is writeable. If not, generate // an appropriate error const char *savePath = getSavePath(); - + #if defined(UNIX) || defined(__SYMBIAN32__) struct stat sb; clearError(); - + // Check whether the dir exists if (stat(savePath, &sb) == -1) { // The dir does not exist, or stat failed for some other reason. @@ -174,7 +173,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) // or is not writeable, the path could be completly bogus, etc. warning("mkdir for '%s' failed!", savePath); perror("mkdir"); - + switch (errno) { case EACCES: setError(SFM_DIR_ACCESS, Common::String("Search or write permission denied")); @@ -198,19 +197,19 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) setError(SFM_DIR_ROFS, Common::String("The parent directory resides on a read-only file system")); break; } - + return 0; } break; case ENOTDIR: setError(SFM_DIR_NOTDIR, Common::String("A component of the path prefix is not a directory")); break; - } + } } else { // So stat() succeeded. But is the path actually pointing to a directory? if (!S_ISDIR(sb.st_mode)) { setError(SFM_DIR_NOTDIR, Common::String("The given savepath is not a directory")); - + return 0; } } @@ -225,7 +224,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) delete sf; sf = 0; } - + return wrapOutSaveFile(sf); } diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h index 9346e79700..8c4fe54bb7 100644 --- a/backends/saves/default/default-saves.h +++ b/backends/saves/default/default-saves.h @@ -26,7 +26,6 @@ #if !defined(BACKEND_SAVES_DEFAULT_H) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) #define BACKEND_SAVES_DEFAULT_H -#include "common/stdafx.h" #include "common/savefile.h" #include "common/str.h" |