]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2004-04-30 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Mon, 10 May 2004 20:11:11 +0000 (20:11 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 10 May 2004 20:11:11 +0000 (20:11 +0000)
* hurd/hurdlookup.c (__hurd_file_name_split): Return ENOENT for "".
(__hurd_directory_name_split): Likewise.

hurd/hurdlookup.c

index c1f6ad7c6674b49c351704ca38bdea5ef03d65d7..77de27150ac23e038400e8001d59c37e9af53eae 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,93,94,95,96,97,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,94,95,96,97,99,2001,2004
+       Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -141,6 +142,8 @@ __hurd_file_name_split (error_t (*use_init_port)
                                     dirname, 0, 0, dir);
        }
     }
+  else if (file_name[0] == '\0')
+    return ENOENT;
   else
     {
       /* "foobar" => cwdir + "foobar".  */
@@ -216,6 +219,8 @@ __hurd_directory_name_split (error_t (*use_init_port)
                                     dirname, 0, 0, dir);
        }
     }
+  else if (file_name[0] == '\0')
+    return ENOENT;
   else
     {
       /* "foobar" => cwdir + "foobar".  */