This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Net release 1.1.0, possible to create orphan files
- To: "Rhet Turnbull" <RhetList at yahoo dot com>,<cygwin at sourceware dot cygnus dot com>
- Subject: Re: Net release 1.1.0, possible to create orphan files
- From: "Terry Lincoln" <lincoln2 at rochester dot rr dot com>
- Date: Sun, 7 May 2000 20:49:28 -0400
- References: <000701bfb86a$ec97aab0$2301a8c0@THINKPAD>
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@engineer.com>
<mailto: llincol1@rochester.rr.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@sourceware.cygnus.com