#8740 closed patch
SAVEFILEMAN: renameSavefile implementation
Reported by: | peres | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
Here is an implementation for SavefileManager::renameSavefile, as Fingolfin suggested on scummvm-devel.
Ticket imported from: #1825132. Ticket imported from: patches/845.
Attachments (2)
Change History (8)
by , 17 years ago
Attachment: | renameSavefile.patch added |
---|
comment:1 by , 17 years ago
The first patch I posted was broken (I removed it from the tracker). Please make sure you got the right one. File Added: renameSavefile.patch
comment:2 by , 17 years ago
One remark : OutSaveFile::finalize() can set the io_failed flag to 1, so I would call it just after write(), ie.
outFile->write(buffer, size); + outFile->finalize(); status |= (outFile->ioFailed()) ? NOTHING_DONE : COPIED;
Wouldn't it be also possible to simplify the code a bit by removing a few if ? It's legal to call delete() and free() with a NULL/0 ptr.
comment:3 by , 17 years ago
Indeed. Here's a modified version of the patch... File Added: renameSavefile-alt.patch
comment:4 by , 17 years ago
Since nobody complained, I just checked my alternate version in. I figure we can make fixes etc. afterwards anyway, but for now I want this to be in the API asap.
comment:5 by , 17 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:6 by , 6 years ago
Component: | → --Other-- |
---|
WORKING renameSavefile implementation