From f748b4760d0f8247001c0b46e9eaf02b379bc3c4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 25 Jul 2011 16:53:18 +0200 Subject: * apt-pkg/contrib/cdromutl.cc: - fix escape problem when looking for the mounted devices --- apt-pkg/contrib/cdromutl.cc | 8 +++++++- debian/changelog | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) 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; } } } diff --git a/debian/changelog b/debian/changelog index 418f37f4d..29a571fb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 12 Jul 2011 11:54:47 +0200 -- cgit v1.2.3