]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- check that snapshot directory exists
authorArvin Schnell <aschnell@suse.de>
Mon, 7 Feb 2011 11:12:02 +0000 (12:12 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 7 Feb 2011 11:12:02 +0000 (12:12 +0100)
snapper/Snapshot.cc

index 6c8fb8c0350e57ab0080bdb526a95803d9368fce..db6ed8d8650ef33210eefbe852c41b5e24b38de2 100644 (file)
@@ -107,6 +107,12 @@ namespace snapper
 
            getChildValue(node, "pre_num", snapshot.pre_num);
 
+           if (!checkDir(snapshot.snapshotDir()))
+           {
+               y2err("snapshot directory does not exist. not adding snapshot " << num);
+               continue;
+           }
+
            entries.push_back(snapshot);
        }