mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
update_ext.cpp: Fix wildcard handling for delete list
Origin commit data
------------------
Commit: de36ce60c4
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-02-10 (Sun, 10 Feb 2013)
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user