- don't trim leading ./ in rpmCleanPath() (#14961).
authorjbj <devnull@localhost>
Sat, 16 Sep 2000 14:05:26 +0000 (14:05 +0000)
committerjbj <devnull@localhost>
Sat, 16 Sep 2000 14:05:26 +0000 (14:05 +0000)
CVS patchset: 4169
CVS date: 2000/09/16 14:05:26

CHANGES
rpmio/macro.c

diff --git a/CHANGES b/CHANGES
index f5e6204..9148ed9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@
        - API: change rpmProblem typedef to pass by reference, not value.
        - unify rpmError and rpmMessge interfaces through rpmlog.
        - collect and display rpm build error messages at end of build.
+       - don't trim leading ./ in rpmCleanPath() (#14961).
 
 3.0.6 -> 4.0
        - use DIRNAMES/BASENAMES/DIRINDICES not FILENAMES in packages and db.
index 2a268d9..2bd0e56 100644 (file)
@@ -1494,9 +1494,12 @@ char *rpmCleanPath(char * path)
            if (t == path && s[1] == '\0') {
                break;
            }
-           /* Trim leading ./ , embedded ./ , trailing /. */
-           if ((t == path || t[-1] == '/') && (s[1] == '/' || s[1] == '\0')) {
-/*fprintf(stderr, "*** Trim leading ./ , embedded ./ , trailing /.\n"); */
+#if 0  /* Trim leading ./ , embedded ./ , trailing /. */
+           if ((t == path || t[-1] == '/') && (s[1] == '/' || s[1] == '\0'))
+#else  /* Trim embedded ./ , trailing /. */
+           if ((t[-1] == '/' && s[1] == '\0') || (t != path && s[1] == '/'))
+#endif
+           {
                s++;
                continue;
            }