diff options
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 7ba5b51e7..1e315e492 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -886,22 +886,19 @@ out: error = EROFS; return; } + else if (dev.devn == FH_NETDRIVE && component) + { + /* This case indicates a non-existant resp. a non-retrievable + share. This happens for instance if the share is a printer. + In this case the path must not be treated like a FH_NETDRIVE, + but like a FH_FS instead, so the usual open call for files + is used on it. */ + dev.parse (FH_FS); + } else if (isvirtual_dev (dev.devn) && fileattr == INVALID_FILE_ATTRIBUTES) { - if (dev.devn == FH_NETDRIVE && component) - { - /* This case indicates a non-existant resp. a non-retrievable - share. This happens for instance if the share is a printer. - In this case the path must not be treated like a FH_NETDRIVE, - but like a FH_FS instead, so the usual open call for files - is used on it. */ - dev.parse (FH_FS); - } - else - { - error = dev.devn == FH_NETDRIVE ? ENOSHARE : ENOENT; - return; - } + error = dev.devn == FH_NETDRIVE ? ENOSHARE : ENOENT; + return; } else if (!need_directory || error) /* nothing to do */; |