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: Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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