delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/02/20/10:16:28

Message-Id: <200002201453.JAA27447@delorie.com>
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Sun, 20 Feb 2000 10:01:43 -0500
MIME-Version: 1.0
Subject: Re: fileutils mkdir gotcha
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000220115846 DOT 25009t AT is>
In-reply-to: <Pine.SUN.3.91.1000220122139.25009x-100000@is>
X-mailer: Pegasus Mail for Win32 (v3.12a)
Reply-To: djgpp-workers AT delorie DOT com

> Or, 
> better yet, make sure /dev/env without anything else gets treated as a 
> normal file/directory, i.e. in this case, /dev/env will actually be 
> created.
> 

Here's the patch I had in mind for putpath.c:

*** djgpp/src/libc/dos/io/putpath.c.orig	Thu Jun  3 13:27:34 1999
--- djgpp/src/libc/dos/io/putpath.c	Sun Feb 20 09:56:26 2000
*************** _put_path2(const char *path, int offset)
*** 140,147 ****
          o--;
        path = p;
      }
-     else if (p[5])
-       path = p + 5;
    }
  
    /* collapse multiple slashes to a single slash */
--- 140,145 ----

The deleted code turns '/dev/unrecognized' into 'unrecognized'. Deleting 
this code lets '/dev/unrecognized' stay as-is just like other files/directories.

- Raw text -


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