diff options
author | Christopher Faylor <me@cgf.cx> | 2007-07-07 16:48:26 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2007-07-07 16:48:26 +0000 |
commit | dee55888399728d1b4652e1a369e0f62a77c1111 (patch) | |
tree | 874126a22b0d9b7c8f179576581ea15b77c5ab17 /winsup/cygwin/path.cc | |
parent | 8581e92c5164652905aaefa6e988fdd7102542af (diff) | |
download | cygnal-dee55888399728d1b4652e1a369e0f62a77c1111.tar.gz cygnal-dee55888399728d1b4652e1a369e0f62a77c1111.tar.bz2 cygnal-dee55888399728d1b4652e1a369e0f62a77c1111.zip |
* path.cc (symlink_info::check_shortcut): Handle device "symlinks" specially -
don't posixify them.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 52c04afc3..e2ac1bb9c 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3064,7 +3064,11 @@ symlink_info::check_shortcut (const char *path, HANDLE h) goto file_not_symlink; cp += 2; cp[len] = '\0'; - res = posixify (cp); + /* Check if this is a device file - these start with the sequence :\\ */ + if (strncmp (cp, ":\\", 2) == 0) + res = strlen (strcpy (contents, cp)); /* Don't try to mess with device files */ + else + res = posixify (cp); if (res) /* It's a symlink. */ pflags = PATH_SYMLINK | PATH_LNK; goto close_it; @@ -4235,7 +4239,7 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit) privilege enabled. The reason is apparently that SetCurrentDirectory calls NtOpenFile without the FILE_OPEN_FOR_BACKUP_INTENT flag set. - + - Unlinking a cwd fails because SetCurrentDirectory seems to open directories so that deleting the directory is disallowed. The below code opens with *all* sharing flags set. */ |