From b8f84d5d755ac01d430f2b6973a074fcb31b9cd2 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 8 Sep 2011 00:18:23 +0000 Subject: [PATCH] Removed warning in case that a partially downloaded file (*.part) is found in tmp when exiting stk. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9783 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/io/file_manager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index e89a48fde..d81725610 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -222,9 +222,12 @@ FileManager::~FileManager() i!=allfiles.end(); i++) { if((*i)=="." || (*i)=="..") continue; - // For now there should be only zip files in tmp + // For now there should be only zip files or .part files + // (not fully downloaded files) in tmp. Warn about any + // other files. std::string full_path=tmp+"/"+*i; - if(StringUtils::getExtension(*i)!="zip") + if(StringUtils::getExtension(*i)!="zip" && + StringUtils::getExtension(*i)!="part" ) { printf("[addons] Warning: unexpected tmp file '%s' found.\n", full_path.c_str());