[Scummvm-devel] Rename savefiles in Parallaction

Max Horn max at quendi.de
Wed Oct 31 18:05:23 CET 2007


Hi folks!

[odd, somehow I didn't get the initial mail on this thread...]

On Mi, Oktober 31, 2007 15:49, John Willis wrote:
>>Savefiles in Parallaction need to be renamed because the first - broken -
>>convention I chose made it into the release last June. The chances are
>>either a true rename [not yet implemented in ScummVM filesystem code, but
>>discussed, as david_corrales pointed out on irc], or a delete/create
>> combo.
>
> Extending the FS code to do this causes me no real problems, with the GP2X
> being Linux based I have a decent underlying stack to manage file ops ;-).
> Saying that managing it any way you see fit should also fit the port so I
> will fall in the majority view.
>

Adding code for savefile renaming  would be a *very* useful addition, and
has been on our TODO list for far too long.

However, this should not be done by extending the filesystem code, for the
same reasons we can't have file deletion code in there (see the recent
thread on File::remove, where Marcus pointed out why this is not such a
good idea).

So, what I propose is this: We add a "renameSavefile" method to the
SaveFileManager API right now. For the time being, we could then provide a
default implementation *inside class SaveFileManager, not
DefaultSaveFileManager*, which loads the old savefile into memory, then
writes the new savefile, then invokes removeSavefile on the old file.

Bye,
Max




More information about the Scummvm-devel mailing list