From 919497ee6bde1f6c1e8b1504b7dc7131779e8ce4 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 17 Aug 2003 17:26:08 +0000 Subject: [PATCH] * dump_setup.cc (check_package_files): Strip leading / and ./ from package file names. --- winsup/utils/ChangeLog | 5 +++++ winsup/utils/dump_setup.cc | 6 ++++++ 2 files changed, 11 insertions(+) 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 + + * dump_setup.cc (check_package_files): Strip leading / and ./ from + package file names. + 2003-08-16 David Rothenberger * 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))