[Scummvm-cvs-logs] scummvm master -> 25b8f196cb89c60011667491734eb13874d9c9fb

bluegr bluegr at gmail.com
Fri Aug 26 10:20:16 CEST 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5734400a37 SCI: Make kFileIORename use wrapped filenames
25b8f196cb Merge pull request #815 from wjp/sci-fileiorename


Commit: 5734400a373cc696c52c3437400d32a5f1af4699
    https://github.com/scummvm/scummvm/commit/5734400a373cc696c52c3437400d32a5f1af4699
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-08-25T22:05:24+02:00

Commit Message:
SCI: Make kFileIORename use wrapped filenames

This fixes deleting savegames in Phantasmagoria 1.

Changed paths:
    engines/sci/engine/kfile.cpp



diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index e5b0aaf..e8b9d04 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -632,6 +632,15 @@ reg_t kFileIORename(EngineState *s, int argc, reg_t *argv) {
 	Common::String oldName = s->_segMan->getString(argv[0]);
 	Common::String newName = s->_segMan->getString(argv[1]);
 
+	// We don't fully implement all cases that could occur here, and
+	// assume the file to be renamed is a wrapped filename.
+	// Known usage: In Phant1 and KQ7 while deleting savegames.
+	// The scripts rewrite the dir file as a temporary file, and then
+	// rename it to the actual dir file.
+
+	oldName = g_sci->wrapFilename(oldName);
+	newName = g_sci->wrapFilename(newName);
+
 	// SCI1.1 returns 0 on success and a DOS error code on fail. SCI32
 	// returns -1 on fail. We just return -1 for all versions.
 	if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName))


Commit: 25b8f196cb89c60011667491734eb13874d9c9fb
    https://github.com/scummvm/scummvm/commit/25b8f196cb89c60011667491734eb13874d9c9fb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-08-26T11:20:11+03:00

Commit Message:
Merge pull request #815 from wjp/sci-fileiorename

SCI: Make kFileIORename use wrapped filenames

Changed paths:
    engines/sci/engine/kfile.cpp









More information about the Scummvm-git-logs mailing list