[Bug 1768] New: scp: wrong error message when destination directory ends with a slash and is missing
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Mon May 10 06:36:20 EST 2010
https://bugzilla.mindrot.org/show_bug.cgi?id=1768
Summary: scp: wrong error message when destination directory
ends with a slash and is missing
Product: Portable OpenSSH
Version: -current
Platform: All
URL: https://bugs.launchpad.net/bugs/18757
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: scp
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: cjwatson at debian.org
Created attachment 1846
--> https://bugzilla.mindrot.org/attachment.cgi?id=1846
set targetshouldbedirectory if there are two file arguments and argv[1]
ends with a slash
Sami Haahtinen reported the following bug as
https://bugs.launchpad.net/bugs/18757:
It appears that scp gets confused if one tries to copy a file in to a
missing directory:
% pwd
/tmp/test
% touch foo
% ls
foo
% scp foo localhost:/tmp/test/not-a-dir/
user at localhost's password:
scp: /tmp/test/not-a-dir/: Is a directory
% scp foo localhost:/tmp/test/not-a-dir
user at localhost's password:
foo 100% 0 0.0KB/s 00:00
% ls
foo not-a-dir
%
above, the error in question should be "Directory does not exist"
instead of "Is a directory"
This seems quite straightforward to fix without causing any
compatibility problems: the scp client already passes -d to the server
side if it knows that the target should be a directory because there
are more than two file arguments, so it could test for a trailing slash
in the same way. Patch attached.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list