X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/f748b4760d0f8247001c0b46e9eaf02b379bc3c4..c45798dbfce66810be2cea8d0051f429f342e90b:/apt-pkg/contrib/cdromutl.cc diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 551efa7d9..187f6bd59 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -10,6 +10,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include @@ -17,8 +19,6 @@ #include #include -#include - #include #include #include @@ -26,8 +26,12 @@ #include #include #include + +#include /*}}}*/ +using std::string; + // IsMounted - Returns true if the mount point is mounted /*{{{*/ // --------------------------------------------------------------------- /* This is a simple algorithm that should always work, we stat the mount point @@ -258,13 +262,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); } } }