delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/05/07/19:45:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <016c01bfb887$453721c0$032c1818@rochester.rr.com>
From: "Terry Lincoln" <lincoln2 AT rochester DOT rr DOT com>
To: "Rhet Turnbull" <RhetList AT yahoo DOT com>, <cygwin AT sourceware DOT cygnus DOT com>
References: <000701bfb86a$ec97aab0$2301a8c0 AT THINKPAD>
Subject: Re: Net release 1.1.0, possible to create orphan files
Date: Sun, 7 May 2000 20:49:28 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

On Sunday, May 07, 2000 5:26 PM Rhet Turnbull wrote:
> Hi everyone.  I've discovered a possible bug in Cygwin or Windows.  I am
> running Cygwin Net Release 1.1.0 and Windows 2000 Professional RC2.  I
> haven't yet had a chance to try on Windows 2000 release or NT 4 but I will
> see what I can do.
>
> Summary: I have a tar file of a users home directory from my linux box.  I
> unpacked the tar file to /tmp of Cygwin.  Among the files in the tar file
> was a file named (without the quotes) ".wine/.cachedmetrics.:0.0"  This
is,
> of course, not a valid NT name. However, tar managed to create a file
called
> ".wine/.cachedmetrics." which shows up in a Windows directory listing as
> ".wine/.cachedmetrics." and under a Cygwin directory listing as:
>
> bash-2.03$ ls -al
> ls: .cachedmetrics.: No such file or directory
>
> The problem:  The file is aparently orphaned and I can't delete it using
> Cygwin or the Windows Explorer.  An attempt to do so in the Windows
Explorer
> tells me: "Cannot delete file: Cannot read from source file or disk."
> Attempting to delete it in bash yields: "rm: .cachedmetrics.: No such file
> or directory"
FYI, the problem of manipulating files with trailing dot (.) has been
recently covered in this list.
  see subject thread "RE: broken 'ln' behaviour"
The answer that apparently works is to use:

  rm '\\?\c:\cygroot\tmp\.wine\.cachedmetrics.'

>
> I was finally able to delete the file in a Windows Command Prompt using
wild
> card expansion.  Trying to delete the file itself didn't work:
> C:\cygroot\tmp\.wine>del .cachedmetrics.
> Could Not Find C:\cygroot\tmp\.wine\.cachedmetrics.
>
> but this did work:
> C:\cygroot\tmp\.wine>del .cache*
>
> The following c snippet will recreate the problem.  So, my question is
this
> a Windows bug, Cygwin bug, or "as advertised feature"?  Thanks much!
>
> -----------------
> #include <stdio.h>
> int main(int argc, char *argv[])
> {
>  FILE *f;
>  char fname[] = ".test.:0.0";
>  if ( (f=fopen(fname,"w+")) == 0)
>  {
>   fprintf(stderr,"cannot create file %s\n",fname);
>   return 0;
>  }
>  fclose(f);
>  return 0;
> }
>8 snip
W. Terry Lincoln ICQ#39362285
Senior Solution Developer [Linux Registered User #99583]
Ciber corporation
<mailto: WTerryLincoln AT engineer DOT com>
<mailto: llincol1 AT rochester DOT rr DOT com>
<http://www.geocities.com/terry_lincoln>
<http://www.angelfire.com/ny/TerryLincoln >



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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