This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Houder <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Tue, 3 Sep 2019 09:47:58 +0300
- Subject: Re: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...
- References: <bc3df101ab93c20b86c3ab7fa7d3ea4f@xs4all.nl> <20190827152549.GY11632@calimero.vinschen.de> <a47cc167b725c08e6f1c914166fabcaf@smtp-cloud8.xs4all.net> <3E262D05-F393-453A-9E43-B248DDE50812@solidrocksystems.com> <b97e4dbe952154efc68412540514ae81@smtp-cloud8.xs4all.net> <20190828125939.GL11632@calimero.vinschen.de> <421ac447-b249-da21-1ca5-228041cfc884@redhat.com> <20190828141556.GM11632@calimero.vinschen.de> <20190828142220.GN11632@calimero.vinschen.de> <ee1138b29ee4be60d62d86d59f581b2e@smtp-cloud8.xs4all.net> <4a87b7a940fb0cf76aac5f3bc5b1a8b3@smtp-cloud7.xs4all.net> <e438666b60ee08a2a3ee4ca16015382f@smtp-cloud9.xs4all.net>
- Reply-to: cygwin at cygwin dot com
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