delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/11/10/15:40:27

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A6F23858D28
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1636576825;
bh=a0/Ff3DNVC+ZzUvvm3CQ736yqUHU0iAF9cy59VNnOYE=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=auUZF/si51eDxrHuP+68LPSQtl3HEHTBtOSvDyOMxrHzCRHm61snx2OQ3aTaBAIQz
05ALjUBHPxch+Elph5+wQBeA0MKP1DWV4HMC+3NSTLxIs91/UcYGtVfXwI2rTQGVtF
ansguRJHNWiBnlMyjDA2ICCIIHZvEPMplMpTFJL4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F29B83858D28
Date: Wed, 10 Nov 2021 21:39:52 +0100
To: cygwin AT cygwin DOT com
Subject: Re: Could rm remove files and folders with colon in their name?
Message-ID: <YYwuGBM5JCXoMxZF@calimero.vinschen.de>
Mail-Followup-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>
MIME-Version: 1.0
In-Reply-To: <d4cfb303-60d9-e53c-d75f-a96f8fbf11b7@emmenlauer.de>
X-Provags-ID: V03:K1:fxenXMJ1NWy0g33USblBDdbEcRZNZJIvtiAm8SY0WNvYHRyUc5z
YC4cILMSlGm5jpGaSJFoT+2xl+cgtSJBEo+s77CHkfOLpoYmNJoRY/JINsgb0lnTDBDLXyX
a4fSxBJvi+dEwv4k6JzwUVWov/1I7+9+WVjzkMUFSzPTCNhgxujGSE5q7RMhnPCJOoDR1WR
vAhVk8nVD+qNxUTTdd1mg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:n2dq+wfmI6Q=:ch0fE31M4YtYRE5Ok6sxjp
r17+/tkYLofceXNVUAsrzzMBb/kLuKByHypZ7Vejsv/E0z9mfK54agXxlNWP513M4TvjTN5DF
xKvBljI1bB4AReZAXujz1RSzBo7ngTtihhKJ660gif+Iam+2uvX+uiPz2w4r9pTAF3TFAAxFm
rNMJrIMC/tUOk536sVWDfqyvHPmeZUkID5bSZaax9G0JUqjalGHz5TyS300ScsbCz4wsodldf
2AUfNSjHuQ/v5v261st9RXa9+VOBJbq2CYYRCC+ClHsCzmI24CYa3ouo3ApFrhQxPGWiVdR98
0V5xhr4IxbgRtKZbBqrmXiXR2+tQ66OmVX5DitISa0MnyTiwm+TwRFRafp9dppNFuochDGWUY
YRXXd7n6fGtDZyjH2JnNUQhdhdNIaYnANFtijYOtJMJo7ozB8aY0CvlOGoBtt1R9kOOAQt4cD
a1OR8X2yxOsEUovDPSIvpmej+F6VCBMpC0CBoLOpWbrmUwGuU1d6i/dXT51cVgFB6+Ac3/mtu
qFeZT1+h5cdeL+59Y+rBsvaP7pJcWat2InTUEdZIhmFM2jtTHF1h9pjGJ6D0m0uAgADbo4dWv
LBnjcEWH6fctfM1yhwmFLUBwFKaS/zHrxuRkPIdPklYd5czXmJiFpvFHE5Y+Uye67F4U3KZpb
+UALmcjOhKod2cJJJNe7+F8u+jl5G6mPQ0zKuztRQ0npZC0OB+Ohqa68nvuZMEIj8W2Qh4vSP
L+3+tp8Cs2QfJcaw
X-Spam-Status: No, score=-99.3 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.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>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
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 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...


Corinna

-- 
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