From: Arvin Schnell Date: Thu, 21 Apr 2011 07:03:19 +0000 (+0200) Subject: - avoid assert X-Git-Tag: v0.1.3~405 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef48aeb1fac2765eb784b62fff82945cb3f97039;p=thirdparty%2Fsnapper.git - avoid assert --- diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index f560286d..1de6c82a 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -66,7 +66,8 @@ namespace snapper string Snapshot::baseDir() const { - assert(num != 0); + if (isCurrent()) + throw IllegalSnapshotException(); return snapper->snapshotsDir() + "/" + decString(num); }