Re: HFS paths (was Tell Blocks Considered Harmful)
Re: HFS paths (was Tell Blocks Considered Harmful)
- Subject: Re: HFS paths (was Tell Blocks Considered Harmful)
- From: "Mark J. Reed" <email@hidden>
- Date: Sun, 21 Dec 2008 18:07:45 -0500
On Sun, Dec 21, 2008 at 5:15 PM, Chris Page <email@hidden> wrote:
> The rscync man page discusses how the command interprets trailing slashes.
> The scp command does not, because, if I read Mark's description correctly,
> the command doesn't do anything special about trailing slashes -- its
> behavior is the same as any command using POSIX paths.
At the lowest level, the treatment of a trailing slash on a path is
system-dependent; if it's specified by POSIX, then I don't know what
the spec says. But on OS X, open(2) and friends fail on a filename
with a trailing slash. Many higher layers APIs and applications
insulate the user from that behavior by silently stripping trailing
slashes.
scp (and rcp) take their behavior in this regard from cp, which
assumes a target filename ending in / is a directory and fail if it
doesn't exist.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden