[Scummvm-git-logs] scummvm branch-2-6 -> 41d96849837fd1c9be61999eb58d10fbf1005a72

sev- noreply at scummvm.org
Sat Jul 9 11:56:08 UTC 2022


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

Summary:
41d9684983 GUI: Check downloaded icon file sizes. Fixes bug #13566


Commit: 41d96849837fd1c9be61999eb58d10fbf1005a72
    https://github.com/scummvm/scummvm/commit/41d96849837fd1c9be61999eb58d10fbf1005a72
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-07-09T13:56:00+02:00

Commit Message:
GUI: Check downloaded icon file sizes. Fixes bug #13566

Changed paths:
    gui/downloadiconsdialog.cpp


diff --git a/gui/downloadiconsdialog.cpp b/gui/downloadiconsdialog.cpp
index 063f1da0445..b3d164a39d4 100644
--- a/gui/downloadiconsdialog.cpp
+++ b/gui/downloadiconsdialog.cpp
@@ -376,7 +376,7 @@ void DownloadIconsDialog::calculateList() {
 		return;
 	}
 
-	// Scan all files in iconspath and remove present ones from the
+	// Scan all files in iconspath and remove present and incomplete ones from the
 	// donwloaded files list
 	Common::FSDirectory *iconDir = new Common::FSDirectory(iconsPath);
 
@@ -386,8 +386,11 @@ void DownloadIconsDialog::calculateList() {
 
 	for (auto ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
 		Common::String fname = (*ic)->getName();
+		Common::SeekableReadStream *str = (*ic)->createReadStream();
+		uint32 size = str->size();
+		delete str;
 
-		if (g_state->fileHash.contains(fname))
+		if (g_state->fileHash.contains(fname) && size == g_state->fileHash[fname])
 			g_state->fileHash.erase(fname);
 	}
 




More information about the Scummvm-git-logs mailing list