chiark / gitweb /
Make --prune-incomplete work on its own
authorJacob Nevins <0jacobnk.git@chiark.greenend.org.uk>
Tue, 14 May 2013 21:34:37 +0000 (22:34 +0100)
committerRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 19 May 2013 15:15:27 +0000 (16:15 +0100)
When specified on its own, specifiers for hosts/volumes weren't read
from the command line, and neither were all hosts/volumes used
implicitly in the absence of command-line arguments.

src/Command.cc
src/rsbackup.cc

index 1ef2292..ad49092 100644 (file)
@@ -187,7 +187,7 @@ void Command::parse(int argc, char **argv) {
      && !retire)
     throw CommandError("no action specified");
 
-  if(backup || prune || retire) {
+  if(backup || prune || pruneIncomplete || retire) {
     // Volumes to back up or retire
     if(optind < argc) {
       for(n = optind; n < argc; ++n) {
index 7c7a8c0..ea3ffff 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
     }
 
     // Select volumes
-    if(command.backup || command.prune)
+    if(command.backup || command.prune || command.pruneIncomplete)
       command.selectVolumes();
 
     // Execute commands