]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- avoid assert
authorArvin Schnell <aschnell@suse.de>
Thu, 21 Apr 2011 07:03:19 +0000 (09:03 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 21 Apr 2011 07:03:19 +0000 (09:03 +0200)
snapper/Snapshot.cc

index f560286d493adf276186ed883072aaa22a0ffce8..1de6c82ac39ae23581a6fa93e9d5241cfed451bc 100644 (file)
@@ -66,7 +66,8 @@ namespace snapper
     string
     Snapshot::baseDir() const
     {
-       assert(num != 0);
+       if (isCurrent())
+           throw IllegalSnapshotException();
 
        return snapper->snapshotsDir() + "/" + decString(num);
     }