pkgUdevCdromDevices UdevCdroms;
bool IsCorrectCD(URI want, string MountPath, string& NewID);
- bool AutoDetectAndMount(URI, string &NewID);
+ bool AutoDetectAndMount(const URI, string &NewID);
virtual bool Fetch(FetchItem *Itm);
string GetID(string Name);
virtual void Exit();
// CDROMMethod::AutoDetectAndMount /*{{{*/
// ---------------------------------------------------------------------
/* Modifies class varaiable CDROM to the mountpoint */
-bool CDROMMethod::AutoDetectAndMount(URI Get, string &NewID)
+bool CDROMMethod::AutoDetectAndMount(const URI Get, string &NewID)
{
vector<struct CdromDevice> v = UdevCdroms.Scan();
return false;
// check if we have the mount point
- const char* AptMountPoint = "/media/apt";
+ string AptMountPoint = _config->FindDir("Dir::Media::MountPath");
if (!FileExists(AptMountPoint))
- mkdir(AptMountPoint, 0750);
+ mkdir(AptMountPoint.c_str(), 0750);
// now try mounting
for (unsigned int i=0; i < v.size(); i++)