]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Prevent manually transferring a read‑write snapshot 1101/head
authorCheng-Ling Lai <jamesljlster@gmail.com>
Thu, 5 Feb 2026 01:30:23 +0000 (09:30 +0800)
committerCheng-Ling Lai <jamesljlster@gmail.com>
Thu, 5 Feb 2026 01:39:49 +0000 (09:39 +0800)
client/snbk/TheBigThing.cc

index 8ab6a2d51865e6c6547a1cdb45072d8140d0a9cf..9a7b8e4640282dc507749a8b3ecddc6864e16af9 100644 (file)
@@ -250,6 +250,8 @@ namespace snapper
 
        if (source_state == SourceState::MISSING)
            SN_THROW(Exception(_("Snapshot not on source.")));
+       else if (source_state == SourceState::READ_WRITE)
+           SN_THROW(Exception(_("Cannot transfer a read-write snapshot.")));
 
        if (target_state != TargetState::MISSING)
            SN_THROW(Exception(_("Snapshot already on target.")));