Added some interesting functionality to my cygwin sandbox

Corinna Vinschen
Wed Jul 2 17:31:00 GMT 2003

On Wed, Jul 02, 2003 at 01:23:13PM -0400, Igor Pechtchanski wrote:
> On Wed, 2 Jul 2003, Corinna Vinschen wrote:
> > iscygdrive(), defined in, should be sufficient.
> Not quite.  Suppose the user wants to create a symlink to some location on
> his /cygdrive/c?  He should be able to do so.  IIRC, there is a difference
> in handling EOL's when accessing files through a Win32 path and through
> /cygdrive (you can control the binary/text mode of /cygdrive with mount
> options).  Do we want to take this away now?

That wouldn't happen if the implementation is correct.  Keep in mind that
symlink target paths are *always* POSIX paths.  Now we're changing that
by just keeping a DOS path as target.  Since we know that it's a path
from a symlink, we can savely assume that the path was originally created
from the corresponding cygdrive path.  So, the next step when reading that
symlink is, revert the DOS path to a cygdrive path.  From now on, the
usual binmode/textmode option of that /cygdrive path applies.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

More information about the Cygwin-developers mailing list