Subject: | Put() tries to fsetstat() in spite of arguments |
Date: | Mon, 19 May 2008 10:54:28 -0400 |
To: | <bug-net-sftp-foreign [...] rt.cpan.org> |
From: | "Bruce Harold" <bharold [...] harvarddruggroup.com> |
When I use put() with a system that does not allow file status changes
the put fails.
Here is my line, trying to avoid setting any remote status:
$stat = $sftp->put($fname, "x1", copy_perms => 0, copy_time
=> 0);
The error resutls:
Couldn't setstat remote file (fsetstat): This server does
not support operations to modify file attributes.
Using a workaround the author posted elsewhere, I commented out the
offending lines in Foreign.pm. The script should not execute these
lines at all if copy_perms is false (0).
Here are the lines (from put) that should be conditional.
# open does not set the attributes for existant files so we do it
again:
$sftp->fsetstat($rfh, $attrs)
or return undef;
The version in my copy of this file is 1.36.
Show quoted text
________________________________
Bruce Harold * The Harvard Drug Group
Email: bharold@harvarddruggroup.com
Phone: 734-743-6261
Fax: 734-743-7261