tags 129577 patch stop
Patch attached.
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/dpkg-1.14.16.6/lib/dpkg-db.h ./lib/dpkg-db.h
--- ../orig/dpkg-1.14.16.6/lib/dpkg-db.h 2008-01-18 11:12:53.000000000 +0100
+++ ./lib/dpkg-db.h 2008-03-10 23:41:29.000000000 +0100
@@ -223,6 +223,7 @@
extern const struct namevalue eflaginfos[];
extern const struct namevalue wantinfos[];
+void rtrim_slash_slashdot(char *string);
const char *skip_slash_dotslash(const char *p);
int informativeversion(const struct versionrevision *version);
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/dpkg-1.14.16.6/lib/parsehelp.c ./lib/parsehelp.c
--- ../orig/dpkg-1.14.16.6/lib/parsehelp.c 2007-09-23 11:20:49.000000000 +0200
+++ ./lib/parsehelp.c 2008-03-11 00:28:55.000000000 +0100
@@ -243,6 +243,37 @@
}
}
+void rtrim_slash_slashdot(char *string) {
+
+ int length;
+
+ if( ! string )
+ return;
+
+ while( ( length = strlen( string ) ) >= 2 )
+ {
+
+ if( string[length-1] == '/' )
+ {
+ string[length-1] = '\0';
+
+ continue;
+ }
+
+ if( string[length-2] == '/' && string[length-1] == '.' )
+ {
+ if( length == 2 )
+ string[length-1] = '\0'; // corner case
+ else
+ string[length-2] = '\0';
+
+ continue;
+ }
+
+ break;
+ }
+}
+
const char *skip_slash_dotslash(const char *p) {
while (p[0] == '/' || (p[0] == '.' && p[1] == '/')) p++;
return p;
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/dpkg-1.14.16.6/src/query.c ./src/query.c
--- ../orig/dpkg-1.14.16.6/src/query.c 2007-09-23 11:20:49.000000000 +0200
+++ ./src/query.c 2008-03-10 23:58:16.000000000 +0100
@@ -289,6 +289,7 @@
ensure_diversions();
while ((thisarg= *argv++) != 0) {
+ rtrim_slash_slashdot( thisarg );
found= 0;
if (!strchr("*[?/",*thisarg)) {
varbufreset(&vb);
signature.asc
Description: This is a digitally signed message part

