[Scummvm-git-logs] scummvm master -> f0bf5b38337f2b387e3e87d66271e8ac24deaa8b

larsamannen noreply at scummvm.org
Tue Jul 8 10:42:28 UTC 2025


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

Summary:
f0bf5b3833 IOS7: Don't override DefaultSaveFileManager::removeSavefile


Commit: f0bf5b38337f2b387e3e87d66271e8ac24deaa8b
    https://github.com/scummvm/scummvm/commit/f0bf5b38337f2b387e3e87d66271e8ac24deaa8b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-08T12:42:24+02:00

Commit Message:
IOS7: Don't override DefaultSaveFileManager::removeSavefile

This function does more than just deleting the file.
Instead, override DefaultSaveFileManager::removeFile which does the real
removal.

Changed paths:
    backends/platform/ios7/ios7_osys_main.cpp


diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp
index bac29971d6f..d82f596b9bb 100644
--- a/backends/platform/ios7/ios7_osys_main.cpp
+++ b/backends/platform/ios7/ios7_osys_main.cpp
@@ -71,20 +71,17 @@ public:
 			: DefaultSaveFileManager(defaultSavepath), _sandboxRootPath(sandboxRootPath) {
 	}
 
-	bool removeSavefile(const Common::String &filename) override {
-		Common::Path chrootedFile = getSavePath().join(filename);
-		Common::Path realFilePath = _sandboxRootPath.join(chrootedFile);
-
-		if (remove(realFilePath.toString(Common::Path::kNativeSeparator).c_str()) != 0) {
-			if (errno == EACCES)
-				setError(Common::kWritePermissionDenied, "Search or write permission denied: "+chrootedFile.toString(Common::Path::kNativeSeparator));
-
-			if (errno == ENOENT)
-				setError(Common::kPathDoesNotExist, "removeSavefile: '"+chrootedFile.toString(Common::Path::kNativeSeparator)+"' does not exist or path is invalid");
-			return false;
-		} else {
-			return true;
-		}
+	Common::ErrorCode removeFile(const Common::FSNode &fileNode) override {
+		Common::Path chrootedFile(fileNode.getPath());
+		Common::Path realFilePath(_sandboxRootPath.join(chrootedFile));
+
+		if (remove(realFilePath.toString(Common::Path::kNativeSeparator).c_str()) == 0)
+			return Common::kNoError;
+		if (errno == EACCES)
+			return Common::kWritePermissionDenied;
+		if (errno == ENOENT)
+			return Common::kPathDoesNotExist;
+		return Common::kUnknownError;
 	}
 };
 




More information about the Scummvm-git-logs mailing list