diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 21:23:30 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 21:23:30 +0100 |
commit | 6e97e817f1082bc98a8f8bf4830d4e3a3bebfb61 (patch) | |
tree | 3c549f514b813f3433288ddaf6541660347bf1e6 /methods/cdrom.cc | |
parent | 25ee65dd5155fda6dd3754d091b86acb5d7bd9dc (diff) | |
parent | ffee221b8d1df28768d30762d72a11289ae747dc (diff) |
merged the latest lp:~mvo/apt/libudev-cdrom branch
Diffstat (limited to 'methods/cdrom.cc')
-rw-r--r-- | methods/cdrom.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc index 0e78851ff..4bbc01c2c 100644 --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@ -116,23 +116,24 @@ bool CDROMMethod::AutoDetectAndMount(URI Get, string &NewID) return false; // check if we have the mount point - if (!FileExists("/media/apt")) - mkdir("/media/apt", 0755); + string AptMountPoint = _config->FindDir("Dir::Media::MountPath"); + if (!FileExists(AptMountPoint)) + mkdir(AptMountPoint.c_str(), 0750); // now try mounting for (unsigned int i=0; i < v.size(); i++) { if (!v[i].Mounted) { - if(MountCdrom("/media/apt", v[i].DeviceName)) + if(MountCdrom(AptMountPoint, v[i].DeviceName)) { - if (IsCorrectCD(Get, "/media/apt", NewID)) + if (IsCorrectCD(Get, AptMountPoint, NewID)) { MountedByApt = true; - CDROM = "/media/apt"; + CDROM = AptMountPoint; return true; } else { - UnmountCdrom("/media/apt"); + UnmountCdrom(AptMountPoint); } } } |