aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-08-17 17:26:08 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-08-17 17:26:08 +0000
commit919497ee6bde1f6c1e8b1504b7dc7131779e8ce4 (patch)
tree353e446bf5d7051eab3f3dd736b4c59da6f2b418
parent22d82f9f46f2edd819a1b328883a7330ca7e1508 (diff)
downloadnewlib-919497ee6bde1f6c1e8b1504b7dc7131779e8ce4.zip
newlib-919497ee6bde1f6c1e8b1504b7dc7131779e8ce4.tar.gz
newlib-919497ee6bde1f6c1e8b1504b7dc7131779e8ce4.tar.bz2
* dump_setup.cc (check_package_files): Strip leading / and ./ from
package file names.
-rw-r--r--winsup/utils/ChangeLog5
-rw-r--r--winsup/utils/dump_setup.cc6
2 files changed, 11 insertions, 0 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index f15024d..639d05b 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-17 David Rothenberger <daveroth@acm.org>
+
+ * dump_setup.cc (check_package_files): Strip leading / and ./ from
+ package file names.
+
2003-08-16 David Rothenberger <daveroth@acm.org>
* dump_setup.cc (package_find): Don't stop searching on missing
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc
index a403188..7dc8625 100644
--- a/winsup/utils/dump_setup.cc
+++ b/winsup/utils/dump_setup.cc
@@ -276,6 +276,12 @@ check_package_files (int verbose, char *package)
while (fgets (buf, MAX_PATH, fp))
{
char *filename = strtok(buf, "\n");
+
+ if (*filename == '/')
+ ++filename;
+ else if (!strncmp (filename, "./", 2))
+ filename += 2;
+
if (filename[strlen (filename) - 1] == '/')
{
if (!directory_exists (verbose, filename, package))