diff options
Diffstat (limited to 'apt-pkg/contrib/cdromutl.cc')
-rw-r--r-- | apt-pkg/contrib/cdromutl.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 821e6d688..551efa7d9 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -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; } } } |