This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin and x: directory
- From: Andrey Repin <anrdaemon at freemail dot ru>
- To: Corinna Vinschen <cygwin at cygwin dot com>
- Date: Tue, 16 Jul 2013 01:46:45 +0400
- Subject: Re: Cygwin and x: directory
- References: <0D835E9B9CD07F40A48423F80D3B5A7021D8E0FC at USA7109MB022 dot na dot xerox dot net> <20130715104018 dot GB18483 at calimero dot vinschen dot de>
- Reply-to: Andrey Repin <cygwin at cygwin dot com>
Greetings, Corinna Vinschen!
> On Jul 12 20:09, Nellis, Kenneth wrote:
>> On 07/12/2013 08:42 AM, Mikko Rapeli wrote:
>> >
>> > Hi Cygwin and git developers,
>> >
>> > Does following scenario show signs of bugs in Cygwin and/or git?
>> >
>> > # setup git repo
>> > $ cd /tmp
>> > $ mkdir foo && cd foo
>> > $ git init
>> >
>> > # create x: directory
>> > $ mkdir x:
>> > $ ls
>> > x:
>>
>> IMHO, this makes an interesting problem (unrelated to git):
>> Shell script prompts user for file name.
>> User enters "x:".
>> Script proceeds as follows:
>> $ mkdir tmpdir
>> $ touch tmpdir/x:
>> $ # useful work done here
>> $ rm -r tmpdir
>> rm: cannot remove `tmpdir/x:': No such file or directory
>> rm: cannot remove `tmpdir': Directory not empty
>> $
> That's a problem of how recursive rm works. It chdir's into
> the subdirs it's working on and then calls "x:" which is recognized
> as drive prefix of a windows path.
Or a file stream with empty name.
Which isn't allowed either, AFAIK.
> `rm ./x:' works as expected.
>> It would seem that touch and rm are following different
>> rules regarding how files may be named.
> No.
> Corinna
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 15.07.2013, <23: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