delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/02/28/09:14:39

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Mon, 28 Feb 2000 08:54:12 -0500
MIME-Version: 1.0
Subject: Revised /dev/env patch
Message-ID: <38BA37B4.5020.34748@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

This patch lets '/dev/env' survive as '/dev/env' so cases like 'mkdir 
/dev/env' in mkinstalldirs don't cause a 'env' dir to be created in the 
current directory.

*** src/libc/dos/io/putpath.c.orig	Thu Jun  3 13:27:34 1999
--- src/libc/dos/io/putpath.c	Sun Feb 27 18:09:12 2000
*************** _put_path2(const char *path, int offset)
*** 140,145 ****
--- 140,150 ----
          o--;
        path = p;
      }
+     else if (strcmp(p, "/dev/env") == 0)
+       /* Prevent from being changed to just 'env' so
+          mkdir '/dev/env' doesn't create 'env' in 
+          the current directory.  */
+       ;
      else if (p[5])
        path = p + 5;
    }

- Raw text -


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