diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-08-17 21:26:08 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-08-17 21:26:08 +0400 |
commit | 919497ee6bde1f6c1e8b1504b7dc7131779e8ce4 (patch) | |
tree | 353e446bf5d7051eab3f3dd736b4c59da6f2b418 | |
parent | 22d82f9f46f2edd819a1b328883a7330ca7e1508 (diff) |
* dump_setup.cc (check_package_files): Strip leading / and ./ from
package file names.
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/dump_setup.cc | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index f15024d26..639d05b33 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 a4031889f..7dc862570 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)) |