diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 21:08:41 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 21:08:41 +0100 |
commit | ffee221b8d1df28768d30762d72a11289ae747dc (patch) | |
tree | 59b7a852879be9bb0b40c2aa74ac54e6b73b7298 /cmdline/apt-cdrom.cc | |
parent | fb503892e3e05132bb7db369440402ff81ea5f8d (diff) |
add Dir::Media::MountPath config option
Diffstat (limited to 'cmdline/apt-cdrom.cc')
-rw-r--r-- | cmdline/apt-cdrom.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 494a7d8df..988a58f20 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -120,11 +120,11 @@ bool AutoDetectCdrom(pkgUdevCdromDevices &UdevCdroms, unsigned int &i) _config->Set("Acquire::cdrom::mount", v[i].MountPath); _config->Set("APT::CDROM::NoMount", true); } else { - const char* AptMountPoint = "/media/apt"; + string AptMountPoint = _config->FindDir("Dir::Media::MountPath"); if (!FileExists(AptMountPoint)) - mkdir(AptMountPoint, 0750); + mkdir(AptMountPoint.c_str(), 0750); if(MountCdrom(AptMountPoint, v[i].DeviceName) == false) - _error->Warning(_("Failed to mount '%s' to '%s'"), v[i].DeviceName.c_str(), AptMountPoint); + _error->Warning(_("Failed to mount '%s' to '%s'"), v[i].DeviceName.c_str(), AptMountPoint.c_str()); _config->Set("Acquire::cdrom::mount", AptMountPoint); _config->Set("APT::CDROM::NoMount", true); } |