From 7ab25f626b66de6eb6e1deafef4e91727873a621 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Sat, 31 May 2008 19:46:31 +0200 Subject: [PATCH] dpkg-query: strip trailing slashes in parameters after -S or --search * src/query.c (searchfiles): Trim trailing slashes (and slash dot) in the arguments of dpkg -S. --- ChangeLog | 5 +++++ debian/changelog | 1 + src/query.c | 1 + 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7e08b107..0f8f9ad2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-31 Raphael Hertzog + + * src/query.c (searchfiles): Trim trailing slashes (and slash dot) + in the arguments of dpkg -S. + 2008-05-24 Guillem Jover * dpkg-deb/build.c (do_build): Move argument name into a parameter to diff --git a/debian/changelog b/debian/changelog index fb8136e6..2209642c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ dpkg (1.15.0) UNRELEASED; urgency=low include the ELF format of the desired library. Closes: #474671 * dpkg-gensymbols now refuses empty values for the the -v -P and -e parameters. + * dpkg -S now trims trailing slashes in its parameters. Closes: #129577 [ Pierre Habouzit ] * Add a --query option to update-alternatives. Closes: #336091, #441904 diff --git a/src/query.c b/src/query.c index dd6d25a0..4c74b47e 100644 --- a/src/query.c +++ b/src/query.c @@ -255,6 +255,7 @@ void searchfiles(const char *const *argv) { while ((thisarg= *argv++) != 0) { found= 0; + rtrim_slash_slashdot(thisarg); if (!strchr("*[?/",*thisarg)) { varbufreset(&vb); varbufaddc(&vb,'*'); -- 2.39.5