From: Brian Warner Date: Tue, 10 Mar 2015 16:17:17 +0000 (-0700) Subject: improve error message for slash-terminated non-directories X-Git-Tag: allmydata-tahoe-1.10.1a1~60^2~6 X-Git-Url: https://git.rkrishnan.org/pf/content/frontends//%22%22.?a=commitdiff_plain;h=f3a9be1c5e767b6f556ab216185b933e2d144292;p=tahoe-lafs%2Ftahoe-lafs.git improve error message for slash-terminated non-directories --- diff --git a/src/allmydata/scripts/tahoe_cp.py b/src/allmydata/scripts/tahoe_cp.py index 850a1b37..59122cfd 100644 --- a/src/allmydata/scripts/tahoe_cp.py +++ b/src/allmydata/scripts/tahoe_cp.py @@ -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: diff --git a/src/allmydata/test/test_cli_cp.py b/src/allmydata/test/test_cli_cp.py index 802227e4..7c36b1c2 100644 --- a/src/allmydata/test/test_cli_cp.py +++ b/src/allmydata/test/test_cli_cp.py @@ -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)