[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autotest vs. in-use directories
From: |
Ralf Wildenhues |
Subject: |
Re: autotest vs. in-use directories |
Date: |
Fri, 10 Apr 2009 08:02:12 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Eric,
* Eric Blake wrote on Thu, Apr 09, 2009 at 08:24:29PM CEST:
> Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
>
> > it's really sad that, while Cygwin adds POSIX-like functionality, it
> > seems it always only gets it half-right, and that then requires other
> > hacks in other tools to work around the remaining deficiencies. :-/
>
> Actually, this one turned out to be a gcc upgrade issue!
> http://cygwin.com/ml/cygwin/2009-04/msg00267.html
Oops. Interesting. And definitely nice of them to fix it so quickly.
> But the point of this patch is not cygwin's (temporary) inability to recreate
> an in-use directory, but the fact that deleting an in-use directory has other
> negative effects on all platforms, leading to confusing messages when your
> interactive shell's current working directory is suddenly made stale even
> though a (new) directory by the name of $PWD still exists.
Yes, ok.
> > Just for safety, I'd remove the directory last. Also, why is this not
> > sufficient?
> > rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.]* || ...
> >
> > since this is only globbing, not regular expressions.
>
> No, the point of the above change is that I'm NOT deleting the current
> directory. Rather, I'm using ALL THREE globs to collectively name every
> possible file within the directory (think 'a', '...', and '.a', each of which
> only match one of the three globs),
Yeah, I'll blame it on me not being concentrated any more when I wrote
that.
> so that after the rm call, the directory
> should still exist but be empty. My question was more whether I am correct
> that 3 globs is sufficient to cover all cases, and that we don't need 4, and
> that no one else knows any trick to make it possible to reduce to 2 globs.
I don't see any currently. But adding a test case that proves that all
three globs are necessary would be prudent.
Cheers,
Ralf