aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-05-08 18:07:27 +0000
committerGravatar Fabio Bas2010-05-08 18:07:27 +0000
commit9b14b06c3b66f6ea3ebc8aff19a51a83a2f42797 (patch)
tree9a9feb3a6fc1e03a27b611dd802355d43e8c8297
parentno-brain patch for #784 (diff)
downloadKVIrc-9b14b06c3b66f6ea3ebc8aff19a51a83a2f42797.tar.gz
KVIrc-9b14b06c3b66f6ea3ebc8aff19a51a83a2f42797.tar.bz2
KVIrc-9b14b06c3b66f6ea3ebc8aff19a51a83a2f42797.zip
fixed infinite loop on corrupted theme installation (could cause a problem with themes containing empty files)
fixed theme error reporting git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4311 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--src/kvilib/file/kvi_packagefile.cpp5
-rw-r--r--src/modules/theme/themefunctions.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/kvilib/file/kvi_packagefile.cpp b/src/kvilib/file/kvi_packagefile.cpp
index 07972f8af..d5e924433 100644
--- a/src/kvilib/file/kvi_packagefile.cpp
+++ b/src/kvilib/file/kvi_packagefile.cpp
@@ -846,13 +846,14 @@ bool KviPackageReader::unpackFile(KviFile * pFile,const QString &szUnpackPath)
inflateEnd(&zstr);
return writeError();
}
- } /* else { THIS HAPPENS FOR ZERO SIZE FILES
+ } else {
+ //THIS HAPPENS FOR ZERO SIZE FILES
debug("hum.... internal, rEWq (ret = %d) (avail_out = %d)",ret,zstr.avail_out);
inflateEnd(&zstr);
setLastError(__tr2qs("Compression library internal error"));
return false;
- } */
+ }
zstr.next_out = obuffer;
zstr.avail_out = BUFFER_SIZE;
}
diff --git a/src/modules/theme/themefunctions.cpp b/src/modules/theme/themefunctions.cpp
index cc6963e55..c91760f3a 100644
--- a/src/modules/theme/themefunctions.cpp
+++ b/src/modules/theme/themefunctions.cpp
@@ -293,7 +293,7 @@ namespace KviThemeFunctions
{
QString szErr2 = r.lastError();
KviQString::sprintf(szError,__tr2qs_ctx("Failed to unpack the selected file: %Q","theme"),&szErr2);
- return true;
+ return false;
}
}