Commit Graph
91 Commits
Author SHA1 Message Date
Eugene Sandulenko fb7095f5a4 COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Le Philousophe 111d259015 ALL: Add limits.h for all codebase 2022-08-22 15:38:10 +02:00
Eugene Sandulenko 5e05f93f36 ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Thierry Crozat aac0f40d2c BACKENDS: Add overloadable removeFile in DefaultSaveFileManager
This allows using the DefaultSaveFileManager on system where
remove() does not exist. See bug #12975.
2021-10-10 11:39:47 +03:00
Orgad Shaneh a0c818bde6 COMMON: Introduce SaveFileManager::exists
Checks if a savefile with given name exists.

Implement on all backends.
2021-08-23 13:34:35 +02:00
Orgad Shaneh fb8f233ed7 BACKENDS: Replace virtual with override in SaveFileManager subclasses 2021-08-23 13:34:35 +02:00
Paul Gilbert 9db14ee109 BACKENDS: Update all the backends to support SeekableWriteStream 2021-08-08 18:13:30 -07:00
sluicebox 9987cc4c5b BACKENDS: Fix undefined parsing of timestamps file
DefaultSaveFileManager::loadTimestamps() was parsing strings from the
timestamps file by checking for end-of-stream after using the byte it
attempted to read. This worked because ReadStream::readByte() returns 0
on error, but that's undefined behavior with a FIXME to remove.

This bug was exposed by the recently added warning when 0 is appended
to a String: ab06f27d43
2021-06-29 13:37:51 -05:00
sluicebox 674ed112aa JANITORIAL: Update more old bug tracker numbers
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00
Cameron Cawley f2b9f7bb76 BACKENDS: Remove the Windows CE port 2019-11-17 22:33:56 +01:00
Cameron Cawley 410923351b Revert "COMMON: Implement FSNode::createDirectoryRecursive()"
This reverts commit aca627bec7.
2019-09-15 00:07:46 +02:00
Cameron Cawley aca627bec7 COMMON: Implement FSNode::createDirectoryRecursive() 2019-08-11 22:15:54 +03:00
Cameron Cawley 04c57babbc BACKENDS: Create the default save directory if it doesn't exist 2019-08-11 22:15:54 +03:00
Alexander Tkachev 1e92e7b9f3 CLOUD: Fix saves syncing
This mostly affects OneDrive saves syncing, because it is the only cloud
provider to return 0 as timestamp of (non-)created file. 0 is treated as
EOF in /saves/timestamps file, thus all timestamps after such 0
timestamps were ignored and files were reuploaded as being "new". This
commit also adds more verbose debug information on SavesSyncRequest
decisions making for easier debugging.
2019-07-30 14:51:41 -04:00
Orgad Shaneh 35c2f9ade5 BACKENDS: Fix crash when save file is owned by another user
fopen() fails, but the null handle was passed on to OutSaveFile.
2019-07-07 14:16:46 +03:00
Cameron Cawley 27e6a28e4e BACKENDS: Fix compilation with SDL_Net enabled and cloud support disabled 2019-04-02 12:02:21 -04:00
Eugene Sandulenko e8b70a4686 ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02:00
Eugene Sandulenko 355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Thierry Crozat c42dfbc496 BACKEND: When removing a save files also remove entry from timestamps file 2016-09-18 05:51:57 +01:00
Thierry Crozat 33d1c55866 BACKENDS: Ignore timestamps for inexistent files in DefaultSaveFileManager
This fixes a bug in the synchronisation of the save files to the cloud when
the timestamps file contains entries for files that do no longer exist. In such
a case the synchronisation would fail.
2016-09-18 05:31:29 +01:00
Alexander Tkachev 438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 3da38ca60b CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
2016-08-24 16:07:55 +06:00
Alexander Tkachev acce1c89ab CLOUD: Fix saves sync
Tested that on actual unix system and found out a few minor bugs related
to paths.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 65e87c6c70 CLOUD: Update save's timestamp on rewrite
This commit moves save/load timestamps static methods into
DefaultSaveFileManager and fixes a few related bugs.
2016-08-24 16:07:55 +06:00
Alexander Tkachev aee713141b CLOUD: Make OutSaveFile start saves sync
It had to become a proxy class in order to do that.
finalize() starts the saves sync.
2016-08-24 16:07:55 +06:00
Alexander Tkachev f6e69b6276 CLOUD: Fix DefaultSaveFileManager again
Now openForLoading() and openForSaving() check whether file is locked,
so AGOS and SCUMM engines Ctrl+number and Alt+number hot keys shouldn't
be able to save/load in these slots during saves sync.
2016-08-24 16:07:55 +06:00
Alexander Tkachev f1a56eaf36 GUI: Show "locked" saves during sync 2016-08-24 16:07:55 +06:00
Alexander Tkachev 9eb4aad7fd CLOUD: Make DefaultSaveFileManager ignore syncing files
MetaEngines don't get "locked" files in the list, so won't try to open
these.

Save/Load dialog updates save list every time SavesSyncRequest tells it
to.
2016-08-24 16:07:55 +06:00
Alexander Tkachev cc4512e50b COMMON: Add SaveFileManager::openRawFile()
It's needed for the cloud saves upload/sync feature.
2016-08-24 16:07:55 +06:00
Johannes Schickel 12046ea0d7 BACKENDS: Remove request to mail Fingolfin. 2016-02-28 07:48:12 +01:00
Johannes Schickel d6d63a16e2 BACKENDS: Make DefaultSaveFileManager case insensitive.
For this we introduce a file cache inside DefaultSaveFileManager similar to
what we use inside FSDirectory. However, we only do small updates for newly
created saves (via openForSaving) or for removed saves (via removeSavefile).
Re-caching is done whenever the savepath changes.

Tizen changes have not been tested.
2016-02-25 22:15:45 +01:00
Willem Jan Palenstijn bf822e7dc0 SYMBIAN: Rename define and rephrase comments 2015-09-14 22:46:19 +02:00
Fedor Strizhnev 99d6dec059 SYMBIAN: Fix compilation error caused by remove macro 2015-09-14 22:43:09 +02:00
Johannes Schickel 121687d2ed BACKENDS: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Filippos Karapetis e10e412bba COMMON: Allow the savefile manager to create uncompressed saves
These are useful in cases where the files can be used in the original
interpreters (such as the exported characters from QFG), in order to avoid
confusion in cases where the users are unaware that these saves are
compressed and are trying to load them in the original interpreters.
2012-06-21 10:48:03 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn 73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Max Horn df05ed1a46 BACKENDS: Include scummsys.h at top of all .cpp files, *before* any #ifdefs
svn-id: r54573
2010-11-29 16:18:43 +00:00
Max Horn daf3fb0df7 WINCE: Remove tons of obsolete workaround code for 'missing' headers and funcs
svn-id: r54089
2010-11-05 10:31:36 +00:00
Max Horn 81a698d0a0 Convert some occurences of StringList to StringArray;
try to fix compile error in GP2x code

svn-id: r48286
2010-03-18 15:44:59 +00:00
Willem Jan Palenstijn 1462efb52d 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 .

svn-id: r42357
2009-07-10 22:29:25 +00:00
Max Horn fb79b18571 Changed SaveFileManager methods to take Common::String params (instead of char pointers)
svn-id: r41000
2009-05-29 14:38:22 +00:00
Max Horn f38e6b0d76 Fix annoying warnings in the default savemanager
svn-id: r38976
2009-02-28 18:07:14 +00:00
Max Horn 8f16458e9b Renamed FSNode::openForReading / openForWriting to createReadStream / createWriteStream, again to make ownership of the returned stream clear
svn-id: r36014
2009-01-23 03:41:36 +00:00
Max Horn 94bfe1aa6f Get rid of the wrappers around the zlib stream wrapper wrappers ;)
svn-id: r36007
2009-01-22 23:14:16 +00:00
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Torbjörn Andersson 7a04c39fa8 Since we don't have FSNode::lookupFile() any more, switch to using
FSDirectory::listMatchingMembers() instead. I hope the new code behaves close
enough to the old one.

svn-id: r35143
2008-11-21 20:02:55 +00:00
Max Horn 4c8f221fb8 Merged SFMError into Common::Error, added some new error codes; revised some error handling in DefaultSaveManager
svn-id: r34915
2008-11-06 16:40:00 +00:00
Max Horn d0c9b0cb23 * turned DefaultSaveFileManager::checkPath into a virtual method
* add a subclass of DefaultSaveFileManager for UNIX, POSIXSaveFileManager, which overloads checkPath
* switched SDL backend to use POSIXSaveFileManager if UNIX is #defined

svn-id: r34872
2008-11-03 10:45:59 +00:00