This is the mail archive of the cygwin-developers@sourceware.cygnus.com 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]

A defect in the pathing routines


I've a small program which shows a problem in the pathing routines.  First, the
problem starts because path.cc assumes that any string containing a \ is a
win32 path.  And if it begins with \ it assumes an absolute win32 path.  IMO,
this is wrong.  In the past cygwin supported the backslash for the cygwin path
as well.  I think it still should.

Also, if the routines think that it's a *relative* path, i.e. not beginning
with a \ then the win32 cwd get prepended to the source string and we end up,
IMC with D:\Cygwin-1.1\tmp\..\tmp\foo which is why the stat for ..\\tmp\\foo
doesn't fail and why the stat for .\\tmp\\foo does fail.  And the stat fo
\\tmp\\foo fails because the routines think it's absolute.

Attached:
foo.c
foo.strace.gz

=====
---
   Earnie Boyd: <mailto:earnie_boyd@yahoo.com>
            __Cygwin: POSIX on Windows__
Cygwin Newbies: <http://www.freeyellow.com/members5/gw32/index.html>
           __Minimalist GNU for Windows__
  Mingw32 List: <http://www.egroups.com/group/mingw32/>
    Mingw Home: <http://www.mingw.org/>

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

foo.c

foo.strace.gz


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