]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- delete all possible filelists
authorArvin Schnell <aschnell@suse.de>
Mon, 14 Feb 2011 15:34:08 +0000 (16:34 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 14 Feb 2011 15:34:08 +0000 (16:34 +0100)
snapper/Snapshot.cc

index 2d1d669e85e0d2e5159568555a20c5a8d3fa4857..17d88fbdcd04de48ee81f3b95686212f5ba89120 100644 (file)
@@ -337,8 +337,13 @@ namespace snapper
 
        unlink((snapshot->baseDir() + "/info.xml").c_str());
 
-       list<string> tmp = glob(snapshot->baseDir() + "/filelist-*.txt", GLOB_NOSORT);
-       for (list<string>::const_iterator it = tmp.begin(); it != tmp.end(); ++it)
+       list<string> tmp1 = glob(snapshot->baseDir() + "/filelist-*.txt", GLOB_NOSORT);
+       for (list<string>::const_iterator it = tmp1.begin(); it != tmp1.end(); ++it)
+           unlink(it->c_str());
+
+       list<string> tmp2 = glob(snapper->snapshotsDir() + "/*/filelist-" +
+                                decString(snapshot->getNum()) + ".txt", GLOB_NOSORT);
+       for (list<string>::const_iterator it = tmp2.begin(); it != tmp2.end(); ++it)
            unlink(it->c_str());
 
        rmdir(snapshot->baseDir().c_str());