delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/24/09:49:02

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10109241344.AA15449@clio.rice.edu>
Subject: Re: Win 2000 rm -rf disaster info
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Mon, 24 Sep 2001 08:44:09 -0500 (CDT)
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.1010924121204.25254K-100000@is> from "Eli Zaretskii" at Sep 24, 2001 12:14:39 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I can see the same on Windows 98 SE, but only if I set LFN=n (and
> modify the file name to use 8+3 aliases instead of names like .libs
> and libstdc++).  With LFN support active, there are no problems,
> everything works as I'd expect.
> 
> Also, when I set LFN=n and try "rm -ir", I get the following message
> for each directory I tell `rm' to descend into:
> 
>   rm: directory djgpp.2/gnu/gcc-3.03/build.djg/i586-pc-msdosdjgpp/libstdc_/src/libs/libstdc_.lax/recycled' is write protected; descend into it anyway?
> 
> So it thinks those fake directories are ``write-protected''...

recycled is write protected, but I did not get a similar message for
the next directory...

This particular version of Windows you get lucky - but if someone
sets lfn=n on Windows and does an rm -rf in the wrong spot you nuke the
hard drive?  Documentation isn't good enough for that, we *MUST* put
a check and a fix in, even if it bloats chdir and makes it slow.

> It's different here: I, too, am dumped in the lower directory, but
> running DJGPP programs _does_ work, and those programs behave as if
> they were in the root.  For example, `ls' prints the names of the
> files in the root directory.  Unsetting LFN gets me back the normal
> behavior, i.e. `ls' prints nothing (as the directory is empty).

Aren't you petrified that by setting an environment variable we treat
a non-root directory as root on one of the most common OSes out there?

> I will try this on plain DOS in the evening, but I think DOS will not
> let me create such a deep directory at all.

Try regular DOS on the hard drive with deep directories already existing.

By the way, I found no problems with number of levels, just with the
short name length (fixed buffer size of 64 chars).

- Raw text -


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