Francois Gouget : testbot/TestAgent: Use the basename of the first filename if the second one is omitted for getfile or sendfile .

Alexandre Julliard julliard at winehq.org
Mon Feb 25 14:02:21 CST 2013


Module: tools
Branch: master
Commit: 82048e24fad06f016a182544829a02a2d5138fe1
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=82048e24fad06f016a182544829a02a2d5138fe1

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Feb 25 16:59:25 2013 +0100

testbot/TestAgent: Use the basename of the first filename if the second one is omitted for getfile or sendfile.

---

 testbot/scripts/TestAgent |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index 8605002..02da611 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -128,13 +128,35 @@ while (@ARGV)
     {
         $Cmd = $arg;
         $LocalFilename = check_opt_val($arg, $LocalFilename);
-        $ServerFilename = check_opt_val($arg, $ServerFilename) if (!$Usage);
+        if (!$Usage)
+        {
+            if (@ARGV)
+            {
+                $ServerFilename = check_opt_val($arg, $ServerFilename);
+            }
+            else
+            {
+                $ServerFilename = $LocalFilename;
+                $ServerFilename =~ s%^.*/%%;
+            }
+        }
     }
     elsif ($arg eq "getfile")
     {
         $Cmd = $arg;
         $ServerFilename = check_opt_val($arg, $ServerFilename);
-        $LocalFilename = check_opt_val($arg, $LocalFilename) if (!$Usage);
+        if (!$Usage)
+        {
+            if (@ARGV)
+            {
+                $LocalFilename = check_opt_val($arg, $LocalFilename);
+            }
+            else
+            {
+                $LocalFilename = $ServerFilename;
+                $LocalFilename =~ s%^.*[/\\]%%;
+            }
+        }
     }
     elsif ($arg eq "run")
     {




More information about the wine-cvs mailing list