if (previous_default != snapshots.end() && scd1.description == default_description)
scd1.description += sformat(" of #%d", previous_default->getNum());
- ProxySnapshots::const_iterator active = snapshots.getActive();
- if (active != snapshots.end() && scd2.description == default_description)
- scd2.description += sformat(" of #%d", active->getNum());
-
ProxySnapshots::const_iterator snapshot1 = snapshots.end();
ProxySnapshots::const_iterator snapshot2 = snapshots.end();
if (!global_options->quiet())
cout << _("Creating read-write snapshot of current subvolume.") << flush;
+ ProxySnapshots::const_iterator active = snapshots.getActive();
+ if (active != snapshots.end() && scd2.description == default_description)
+ scd2.description += sformat(" of #%d", active->getNum());
+
scd2.read_only = false;
snapshot2 = snapper->createSingleSnapshot(snapshots.getCurrent(), scd2);
if (!global_options->quiet())
cout << sformat(_("Creating read-write snapshot of snapshot %d."), tmp->getNum()) << flush;
+ if (tmp != snapshots.end() && scd2.description == default_description)
+ scd2.description += sformat(" of #%d", tmp->getNum());
+
scd2.read_only = false;
snapshot2 = snapper->createSingleSnapshot(tmp, scd2);