]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
improve error message for slash-terminated non-directories
authorBrian Warner <warner@lothar.com>
Tue, 10 Mar 2015 16:17:17 +0000 (09:17 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 10 Mar 2015 16:17:17 +0000 (09:17 -0700)
src/allmydata/scripts/tahoe_cp.py
src/allmydata/test/test_cli_cp.py

index 850a1b37df0470bdd1538016305e1daa8cf6c1c1..59122cfd44a5d4cdc7a846db233d3e618de140e9 100644 (file)
@@ -531,7 +531,7 @@ class Copier:
                 target_is_file = False
 
         if target_is_file and target_has_trailing_slash:
-            self.to_stderr("target is not a directory, but has a slash")
+            self.to_stderr("target is not a directory, but ends with a slash")
             return 1
 
         if len(sources) > 1 and target_is_file:
index 802227e4cea20cc85055373c8415c535c6d77f90..7c36b1c2f64d739e7b32385aa3c7641b2474ae64 100644 (file)
@@ -919,7 +919,7 @@ class CopyOut(GridTestMixin, CLITestMixin, unittest.TestCase):
                     return set(["E5-DIRTOFILE"])
                 if err == "copying multiple things requires target be a directory":
                     return set(["E6-MANYONE"])
-                if err == "target is not a directory, but has a slash":
+                if err == "target is not a directory, but ends with a slash":
                     return set(["E7-BADSLASH"])
             self.fail("unrecognized error ('%s') %s" % (case, res))
         d.addCallback(_check)