From: Arvin Schnell Date: Mon, 14 Feb 2011 15:34:08 +0000 (+0100) Subject: - delete all possible filelists X-Git-Tag: v0.1.3~488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a208840f1708c956a3a0878329ca2372db271d4f;p=thirdparty%2Fsnapper.git - delete all possible filelists --- diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index 2d1d669e..17d88fbd 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -337,8 +337,13 @@ namespace snapper unlink((snapshot->baseDir() + "/info.xml").c_str()); - list tmp = glob(snapshot->baseDir() + "/filelist-*.txt", GLOB_NOSORT); - for (list::const_iterator it = tmp.begin(); it != tmp.end(); ++it) + list tmp1 = glob(snapshot->baseDir() + "/filelist-*.txt", GLOB_NOSORT); + for (list::const_iterator it = tmp1.begin(); it != tmp1.end(); ++it) + unlink(it->c_str()); + + list tmp2 = glob(snapper->snapshotsDir() + "/*/filelist-" + + decString(snapshot->getNum()) + ".txt", GLOB_NOSORT); + for (list::const_iterator it = tmp2.begin(); it != tmp2.end(); ++it) unlink(it->c_str()); rmdir(snapshot->baseDir().c_str());