From b6eb1f2f6b1ebe0eda2cfc33841aac12097563ce Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 10 Feb 2013 10:17:42 +0100 Subject: [PATCH] update_ext.cpp: Fix wildcard handling for delete list Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/de36ce60c421f0a5991a230b0bbbf950e07d8b7f Author: Michael Liebmann Date: 2013-02-10 (Sun, 10 Feb 2013) --- src/gui/update_ext.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index 50619921f..601b11647 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -596,13 +596,13 @@ bool CExtUpdate::readBackupList(const std::string & dstPath) // read DeleteList for(it = deleteList.begin(); it != deleteList.end(); ++it) { line = *it; - if (lstat(line.c_str(), &FileInfo) != -1) { - if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { - // Wildcards - WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); - deleteFileList(line.c_str()); - } - else if (S_ISREG(FileInfo.st_mode)) { + if ((line.find("*") != std::string::npos) || (line.find("?") != std::string::npos)) { + // Wildcards + WRITE_UPDATE_LOG("delete file list: %s\n", line.c_str()); + deleteFileList(line.c_str()); + } + else if (lstat(line.c_str(), &FileInfo) != -1) { + if (S_ISREG(FileInfo.st_mode)) { // File WRITE_UPDATE_LOG("delete file: %s\n", line.c_str()); unlink(line.c_str());