From f3a9be1c5e767b6f556ab216185b933e2d144292 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 10 Mar 2015 09:17:17 -0700 Subject: [PATCH] improve error message for slash-terminated non-directories --- src/allmydata/scripts/tahoe_cp.py | 2 +- src/allmydata/test/test_cli_cp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 2.45.2