summaryrefslogtreecommitdiff
path: root/methods/cdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-01-27 12:11:07 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-01-27 12:11:07 +0100
commit93adae194b5db00e3afb8fe89b907eed9df28763 (patch)
treea9e3534bfd019632379fcb6f01d16a80838173af /methods/cdrom.cc
parentbca4c203ac8664f7cdbffd4ce8474b358f708658 (diff)
merge 1695..1701 from the lp:~mvo/apt/mvo branch
Diffstat (limited to 'methods/cdrom.cc')
-rw-r--r--methods/cdrom.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index b3f461816..6d694e7c9 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -116,23 +116,24 @@ bool CDROMMethod::AutoDetectAndMount(const 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);
}
}
}