]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/contrib/cdromutl.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Jul 2011 14:53:18 +0000 (16:53 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 25 Jul 2011 14:53:18 +0000 (16:53 +0200)
  - fix escape problem when looking for the mounted devices

apt-pkg/contrib/cdromutl.cc
debian/changelog

index 821e6d688e45b2fd083ffea530de738dd0101dbd..551efa7d91a2cad6b5f2f60ee891bb77660b4ad7 100644 (file)
@@ -258,7 +258,13 @@ string FindMountPointForDevice(const char *devnode)
                if(TokSplitString(' ', buf, out, 10))
                {
                   fclose(f);
-                  return string(out[1]);
+                  // unescape \040 and return the path
+                  size_t pos;
+                  string mount_point = out[1];
+                  static const char *needle = "\\040";
+                  while ((pos = mount_point.find(needle)) != string::npos)
+                     mount_point.replace(pos, strlen(needle), " ");
+                  return mount_point;
                }
             }
          }
index 418f37f4d0ab6459ab1652734e4f8f464eac4ce4..29a571fb9e532b27d114de6736a443aadfdabaa7 100644 (file)
@@ -4,6 +4,8 @@ apt (0.8.15.2) unstable; urgency=high
     code (LP: #784473)
   * cmdline/apt-get.cc:
     - fix missing download progress in apt-get download
+  * apt-pkg/contrib/cdromutl.cc:
+    - fix escape problem when looking for the mounted devices
 
  -- Michael Vogt <mvo@debian.org>  Tue, 12 Jul 2011 11:54:47 +0200