Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...

Andrey Repin anrdaemon@yandex.ru
Tue Sep 3 06:50:00 GMT 2019


Greetings, Houder!

> Examining this (obsure) method in path.cc, I corrected the code
> in 2 places:

> ---
>       if (dev.isfs ())
>         {
>           //if (strncmp (path, "\\\\.\\", 4)) <==== 1171
>           if ( ! strncmp (path, "\\\\.\\", 4)) // <==== [1]
>             {
>               if (!tail || tail == path)
>                 /* nothing */;
>               else if (tail[-1] != '\\')
>                 *tail = '\0'; <==== Ah! (you should not do that!)
>               else
>                 {
>                   error = ENOENT;
>                   return;
>                 }
>             }

> [1] this code should be executed only if path == '\\.\' !!

"\\.\" is an UNC reference to "this host".
Used f.e. in references to Windows "named pipes".


-- 
With best regards,
Andrey Repin
Tuesday, September 3, 2019 9:46:42

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list