]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/cdromutl.cc
apt-pkg/pkgcachegen.cc: fix compiler error
[apt.git] / apt-pkg / contrib / cdromutl.cc
index 551efa7d91a2cad6b5f2f60ee891bb77660b4ad7..e25caf1a53aface16d4075fef1588e4ff60f7046 100644 (file)
@@ -258,13 +258,9 @@ string FindMountPointForDevice(const char *devnode)
                if(TokSplitString(' ', buf, out, 10))
                {
                   fclose(f);
-                  // unescape \040 and return the path
-                  size_t pos;
+                  // unescape the \0XXX chars in the path
                   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;
+                  return DeEscapeString(mount_point);
                }
             }
          }