[Scummvm-git-logs] scummvm master -> 6d955fdffdc1029410240db483b8d3655c5e8720
lephilousophe
noreply at scummvm.org
Sat Jun 28 17:26:42 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
c95a6f1e86 ANDROID: Delete local reference when finished with the object
6d955fdffd ANDROID: Override the proper delete function
Commit: c95a6f1e86f394c4d5b988aea194504bef0c1bff
https://github.com/scummvm/scummvm/commit/c95a6f1e86f394c4d5b988aea194504bef0c1bff
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-06-28T19:26:25+02:00
Commit Message:
ANDROID: Delete local reference when finished with the object
Changed paths:
backends/fs/android/android-saf-fs.cpp
diff --git a/backends/fs/android/android-saf-fs.cpp b/backends/fs/android/android-saf-fs.cpp
index 527fd98247f..38d5fa8bf40 100644
--- a/backends/fs/android/android-saf-fs.cpp
+++ b/backends/fs/android/android-saf-fs.cpp
@@ -703,6 +703,7 @@ bool AndroidSAFFilesystemNode::remove() {
return false;
AndroidSAFFilesystemNode *parent = new AndroidSAFFilesystemNode(_safTree, jparent);
+ env->DeleteLocalRef(jparent);
size_t pos = _path.findLastOf('/');
if (pos == Common::String::npos) {
Commit: 6d955fdffdc1029410240db483b8d3655c5e8720
https://github.com/scummvm/scummvm/commit/6d955fdffdc1029410240db483b8d3655c5e8720
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-06-28T19:26:25+02:00
Commit Message:
ANDROID: Override the proper delete function
The DefaultSaveFileManager::removeSavefile function handles caching so
if we override and don't update the caches we get desynced.
Overriding removeFile makes it cleaner.
Changed paths:
backends/platform/android/android.cpp
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 3a9c075146e..e09506a6d5f 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -147,12 +147,12 @@ class AndroidSaveFileManager : public DefaultSaveFileManager {
public:
AndroidSaveFileManager(const Common::Path &defaultSavepath) : DefaultSaveFileManager(defaultSavepath) {}
- bool removeSavefile(const Common::String &filename) override {
- Common::String path = getSavePath().join(filename).toString(Common::Path::kNativeSeparator);
+ Common::ErrorCode removeFile(const Common::FSNode &fileNode) override {
+ Common::String path(fileNode.getPath().toString(Common::Path::kNativeSeparator));
AbstractFSNode *node = AndroidFilesystemFactory::instance().makeFileNodePath(path);
if (!node) {
- return false;
+ return Common::kPathDoesNotExist;
}
AndroidFSNode *anode = dynamic_cast<AndroidFSNode *>(node);
@@ -161,17 +161,14 @@ public:
// This should never happen
warning("Invalid node received");
delete node;
- return false;
+ return Common::kUnknownError;
}
bool ret = anode->remove();
delete anode;
- if (!ret) {
- setError(Common::kUnknownError, Common::String::format("Couldn't delete the save file: %s", path.c_str()));
- }
- return ret;
+ return ret ? Common::kNoError : Common::kUnknownError;
}
};
More information about the Scummvm-git-logs
mailing list