delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/01/07:03:48

Date: Mon, 01 Oct 2001 13:03:07 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <2110-Mon01Oct2001130307+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
In-reply-to: <200110010921.LAA18740@lws256.lu.erisoft.se> (message from Martin
Stromberg on Mon, 1 Oct 2001 11:21:44 +0200 (MET DST))
Subject: Re: fixpath patch (rev 3)
References: <200110010921 DOT LAA18740 AT lws256 DOT lu DOT erisoft DOT se>
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

> From: Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se>
> Date: Mon, 1 Oct 2001 11:21:44 +0200 (MET DST)
> > 
> > Not good: there could be a real directory "/bogus" on that drive.
> > 
> > "/dev/:bogus:" would be a better idea.
> 
> But we already disallow /dev/ (because of Unix compatibility). Plus we
> already have /dev/env. In what way would /dev/bogus be different?

We don't disallow /dev/, we only interpret it in a way that may look
strange to a naive user.  But if such a directory exists, we still act
on it.

Thus, if we return /dev/bogus, there's a possibility that a command
such as "rm -rf d:/longer/than/64characters/directory" will nuke the
directory d:/bogus and all its subdirectories.

By contrast, /dev/:bogus: cannot possibly cause such nasty accidents,
since DOS and Windows don't allow colons in file names.  So all you
will see is some messsage like:

  rm: Cannot remove /dev/:bogus:: No such file or directory (ENOENT)

- Raw text -


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