Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 05cc51920a41c76f49292e57bcb95121 > files > 7

manaplus-1.1.5.1-5.mga1.src.rpm

From c04b7289eb1dd2bcd51d5d024af3ab419f958e28 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Sun, 8 Jan 2012 21:37:28 +0300
Subject: [PATCH 2/2] Add check for update files path.

---
 src/gui/updatewindow.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index bc74aeb..ef835a5 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -87,7 +87,8 @@ std::vector<updateFile> loadXMLFile(const std::string &fileName)
         else
             file.required = false;
 
-        files.push_back(file);
+        if (checkPath(file.name))
+            files.push_back(file);
     }
 
     return files;
@@ -114,7 +115,7 @@ std::vector<updateFile> loadTxtFile(const std::string &fileName)
             thisFile.required = true;
             thisFile.desc = "";
 
-            if (!thisFile.name.empty())
+            if (!thisFile.name.empty() && checkPath(thisFile.name))
                 files.push_back(thisFile);
         }
     }
-- 
1.7.1