Francois Gouget : testbot: Fix the "no snapshot" case in BackupVM.

Alexandre Julliard julliard at winehq.org
Tue Aug 27 15:26:08 CDT 2019


Module: tools
Branch: master
Commit: 8c53a4830914ace8293504a337c5c3e6e979da83
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=8c53a4830914ace8293504a337c5c3e6e979da83

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Aug 27 01:53:23 2019 +0200

testbot: Fix the "no snapshot" case in BackupVM.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/scripts/BackupVM | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/testbot/scripts/BackupVM b/testbot/scripts/BackupVM
index 2cf3320..d7e5483 100755
--- a/testbot/scripts/BackupVM
+++ b/testbot/scripts/BackupVM
@@ -209,10 +209,14 @@ then
 fi
 
 snapshots=`echo "/$snapdir/$opt_vm"/*.xml`
-if [ -n "$opt_snapshot" -a "$snapshots" = "/$snapdir/$opt_vm/*.xml" ]
+if [ "$snapshots" = "/$snapdir/$opt_vm/*.xml" ]
 then
-    error "the '$opt_vm' VM does not seem to have snapshots! Use --no-snapshot if this is expected."
-    exit 2
+    if [ -n "$opt_snapshot" ]
+    then
+        error "the '$opt_vm' VM does not seem to have snapshots! Use --no-snapshot if this is expected."
+        exit 2
+    fi
+    snapshots=""
 fi
 
 # Backup the symbolic links but also their targets!




More information about the wine-cvs mailing list