This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] chmod fails with windows path


Eric Blake <ebb9 <at> byu.net> writes:

> 
> Eric Blake <ebb9 <at> byu.net> writes:
> 
> > Or, more accurately, a limitation of the coreutils .exe magic getting
> > thrown off by the switch to the new cygwin_conv_path.
> 
> On further thought, chmod doesn't do .exe magic to begin with (cp, mv, and ln 
> do, but not chmod).  Maybe the culprit is the fact that coreutils uses 
fchmodat 
> rather than chmod?

Yep.  I stepped through chmod(1) in the debugger, and this call failed:

fchmodat(AT_FDCWD, "c:/blah", 0755, 0);

even though I previously created "/cygdrive/c/blah".

It looks like gen_full_path_at is to blame; it is not recognizing DOS-style 
absolute paths; it tries to construct {cygheap->cwd.posix}"/c:/blah" rather 
than "c:/blah", and since "./c:" is not a directory, you get the failure.

Which means I don't have to change anything in coreutils, but cygwin1.dll does 
need a refresh.

-- 
Eric Blake



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]