diff options
author | Christopher Faylor <me@cgf.cx> | 2005-04-04 20:07:36 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-04-04 20:07:36 +0400 |
commit | 82ae6271bae18731076156c2a52065cfb89d2f53 (patch) | |
tree | b092483febe8b0ab2c23efb0fff5e0eff6d8b9ae /winsup/cygwin/path.cc | |
parent | 33ef35c8ad861318c14cc9b5908eff5eeeeccfa0 (diff) |
* path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end
component.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 688804a07..b4bbe5681 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -556,7 +556,6 @@ path_conv::check (const char *src, unsigned opt, error = 0; else if ((error = check_null_empty_str (src))) return; - unsigned pflags_or = (opt & PC_NO_ACCESS_CHECK); /* This loop handles symlink expansion. */ for (;;) { @@ -588,7 +587,8 @@ path_conv::check (const char *src, unsigned opt, sym.contents[0] = '\0'; int symlen = 0; - for (;;) + + for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0) { const suffix_info *suff; char pathbuf[CYG_MAX_PATH]; @@ -782,7 +782,7 @@ is_virtual_symlink: else break; } - else if (sym.error != ENOENT && sym.error != ENOSHARE) + else if (sym.error && sym.error != ENOENT && sym.error != ENOSHARE) { error = sym.error; goto out; |