From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by sourceware.org (Postfix) with ESMTPS id A91A63850205 for ; Thu, 16 Jun 2022 16:45:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A91A63850205 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 (ak044095.dynamic.ppp.asahi-net.or.jp [119.150.44.95]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 25GGieqT017311 for ; Fri, 17 Jun 2022 01:44:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 25GGieqT017311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1655397880; bh=p2LkqUDTE0ZQP7mp+q+fqy3GNyOttzjFT5KMI+PhvyM=; h=Date:From:To:Subject:In-Reply-To:References:From; b=xMGTdmiKT21cC9Qvdc0nbIC9q9Za6EnnFXqvP3ZTR5eGLRTrpIeQDzEiLD2Tcop6Q hBW0SEDpdiQ1+qyqT3r6v8ZzkMZtMogSrTtcGeeeO0Mt0AdmlvRQSJYjnWpKidLiBn Q9wBbU+5Kiod85zMG0PQ10JYOpwTKcTtC+PiC0aTHQoAnidKq4FTdNzt8lGsBhGpAO jFwbskrqI9YycabQEp39QybNG8tGN5n/8Fyp3vs0pcAEbSGmGDI2GuH47XquH7xwH5 Fbkg96xujCsyqOpO5ArBawmJPhDQ4j8Hg3D2rCSZDkSLTcNpk74fJpiwPfiYF3/Kff R75sR+P6G6/kQ== X-Nifty-SrcIP: [119.150.44.95] Date: Fri, 17 Jun 2022 01:44:40 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: unzip failure with files that contain colons Message-Id: <20220617014440.695b55eaae270bb3b19f87c7@nifty.ne.jp> In-Reply-To: <9093a683-0215-3835-42f5-a8f82975c29f@cs.umass.edu> References: <20220615183007.7xchz44wwbx2gnio@lucy.dinwoodie.org> <20220617002939.65c772fc3504f992b6fcf4d9@nifty.ne.jp> <9093a683-0215-3835-42f5-a8f82975c29f@cs.umass.edu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin@cygwin.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: , X-List-Received-Date: Thu, 16 Jun 2022 16:45:10 -0000 On Thu, 16 Jun 2022 11:50:23 -0400 Eliot Moss wrote: > On 6/16/2022 11:29 AM, Takashi Yano wrote: > > On Thu, 16 Jun 2022 06:22:38 +0200 > > Thomas Wolff wrote: > >> Am 15.06.2022 um 20:30 schrieb Adam Dinwoodie: > >>> Cygwin generally handles filenames with colons just fine, by mapping the > >>> character to some higher Unicode character and remapping on the fly. > >>> However Cygwin's `unzip` appears to have a bug: when unzipping an > >>> archive that contains a filename with a colon, it replaces the colon > >>> with an underscore. > >>> > >>> cygcheck.out and simple test script attached; expected behaviour from > >>> running `bash unzip-bug.sh` is that you get an empty file called `a:b`, > >>> but on Cygwin you instead get an empty file called `a_b`. > >> It's an explicit #ifdef __CYGWIN__ in upstream unzip, file unix/unix.c, > >> which transforms a bunch of characters. > >> If I uncomment most of them (except \), all unpack fine: > >> x0:z  x1z  x3|z  x4"z  x5?z  x6*z > > > > I have taken over the maintenance of unzip package, and > > fix the problem in the updated unzip-6.0-18. > > https://cygwin.com/pipermail/cygwin/2022-June/251653.html > > Is colon used for ADS under Windows? Could that be why one should > be careful with it? Cygwin replaces ':' (0x3A) in file name with U+F03A when creating the file. See winsup/cygwin/path.cc and winsup/cygwin/strfuncs.cc. Therefore, ':' can be safely used in file name without conflict. -- Takashi Yano