Преглед изворни кода

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.
Raphael Hertzog пре 18 година
родитељ
комит
7ab25f626b
3 измењених фајлова са 7 додато и 0 уклоњено
  1. 5 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 1 0
      src/query.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-05-31  Raphael Hertzog  <hertzog@debian.org>
+
+	* src/query.c (searchfiles): Trim trailing slashes (and slash dot)
+	in the arguments of dpkg -S.
+
 2008-05-24  Guillem Jover  <guillem@debian.org>
 
 	* dpkg-deb/build.c (do_build): Move argument name into a parameter to

+ 1 - 0
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

+ 1 - 0
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,'*');