delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/11/09:00:48

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2C8BF385840A
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=emmenlauer.de
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=emmenlauer.de
Message-ID: <0f5802ef-5fbc-9d39-3bfa-a433e1eb5d0d@emmenlauer.de>
Date: Thu, 11 Nov 2021 15:00:19 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.0
To: cygwin AT cygwin DOT com
References: <e2bbb443-b876-40fe-ca58-ab0c7d064f7b AT emmenlauer DOT de>
<YYvN4unktsDraw4g AT calimero DOT vinschen DOT de>
<d4cfb303-60d9-e53c-d75f-a96f8fbf11b7 AT emmenlauer DOT de>
<YYwuGBM5JCXoMxZF AT calimero DOT vinschen DOT de>
From: Mario Emmenlauer <mario AT emmenlauer DOT de>
In-Reply-To: <YYwuGBM5JCXoMxZF@calimero.vinschen.de>
X-SA-Exim-Connect-IP: 213.160.25.97
X-SA-Exim-Mail-From: mario AT emmenlauer DOT de
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-Spam-Level:
X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
NICE_REPLY_A, SPF_HELO_NONE, TXREP,
T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.4
Subject: Re: Could rm remove files and folders with colon in their name?
X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000)
X-SA-Exim-Scanned: Yes (on aldebaran.he1ix.org)
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 10/11/2021 21:39, Corinna Vinschen via Cygwin wrote:
> On Nov 10 21:24, Mario Emmenlauer wrote:
>> On 10.11.21 14:49, Corinna Vinschen via Cygwin wrote:
>>> On Nov 10 10:45, Mario Emmenlauer wrote:
>>>> Could 'rm' support removing files and folders that have a colon ':' in
>>>> their name? I.e. I would like that 'rm -fr' would remove a full directory
>>>> tree, including such folders. Currently it will correctly remove anything
>>>> inside such folders, but not the folder itself.
>>>>
>>>> As an example, for the following structure:
>>>>      C:/root/folder/C:/inside/file.txt
>>>>
>>>> When using 'rm -fr root', afterwards I have:
>>>>      C:/root/folder/C:
>>>
>>> It works fine if the folder is called, say, "a:b", it just doesn't
>>> work for a name which looks like a drive letter "x:", apparently.
>>
>> That is indeed interesting, I was not aware of it! Then maybe the
>> problem is not so hard to solve? That would be awesome!
> 
> To the contrary.  The problem is the ambiguity that "X:/foo" might
> be either the absolute POSIX path $CWD/X:/foo, or the absolute DOS
> path "X:\foo".  I have a patch which fixes your case, but not much
> else.  The problem is that we historically allow DOS paths as input
> at all.  That was a bad decision from the start, but you can't easily
> change 25 years of history...

Oh my, I see! All the more thanks for so quickly patching support for
this use case. Its highly appreciated!

All the best,

     Mario


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019