(make_path): Put only newly created directories on the LEADING_DIRS list.
authorJim Meyering <jim@meyering.net>
Sat, 10 Jan 1998 10:22:30 +0000 (10:22 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 10 Jan 1998 10:22:30 +0000 (10:22 +0000)
lib/makepath.c

index ff499cab05d22e08733195249999e98c16f4249c..98e1ff573a358c7c398c62743bf5629f1d1128d7 100644 (file)
@@ -1,5 +1,5 @@
 /* makepath.c -- Ensure that a directory path exists.
-   Copyright (C) 1990, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -255,7 +255,7 @@ make_path (const char *argpath,
              return 1;
            }
 
-         if (re_protect)
+         if (newly_created_dir && re_protect)
            {
              struct ptr_list *new = (struct ptr_list *)
                alloca (sizeof (struct ptr_list));