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
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.
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.
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.
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.
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.
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.
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.
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
* add a subclass of DefaultSaveFileManager for UNIX, POSIXSaveFileManager, which overloads checkPath
* switched SDL backend to use POSIXSaveFileManager if UNIX is #defined
svn-id: r34872