summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-05-10 20:11:11 +0000
committerRoland McGrath <roland@gnu.org>2004-05-10 20:11:11 +0000
commit92d6708bf812d000c18661ef9efeaf6c38dca892 (patch)
treead04193584fe6c9222e321d02ebb483bc9a97ba5
parentdcf147a5390af60c83fe6b548b106ed81ea27148 (diff)
downloadglibc-92d6708bf812d000c18661ef9efeaf6c38dca892.tar.gz
2004-04-30 Roland McGrath <roland@frob.com>
* hurd/hurdlookup.c (__hurd_file_name_split): Return ENOENT for "". (__hurd_directory_name_split): Likewise.
-rw-r--r--hurd/hurdlookup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hurd/hurdlookup.c b/hurd/hurdlookup.c
index c1f6ad7c66..77de27150a 100644
--- a/hurd/hurdlookup.c
+++ b/hurd/hurdlookup.c
@@ -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". */