#include <dirent.h>
#include <unistd.h>
#include <stdio.h>
+#include <algorithm>
#include "indexcopy.h"
CDROM.c_str());
log->Update(msg.str());
}
-
- if (_config->FindB("APT::CDROM::NoMount",false) == false)
- if (MountCdrom(CDROM) == false)
- return _error->Error("Failed to mount the cdrom.");
+ if (MountCdrom(CDROM) == false)
+ return _error->Error("Failed to mount the cdrom.");
// Hash the CD to get an ID
if(log)
if(log) {
msg.str("");
- ioprintf(msg, "Found label '%s'\n", Name.c_str());
+ ioprintf(msg, _("Found label '%s'\n"), Name.c_str());
log->Update(msg.str());
}
Database.Set("CD::" + ID + "::Label",Name);
// Unmount and finish
- if (_config->FindB("APT::CDROM::NoMount",false) == false &&
- _config->FindB("APT::CDROM::UnMountOnFinish",true) == true) {
- log->Update(_("Unmounting CD-ROM..."), STEP_LAST);
+ if (_config->FindB("APT::CDROM::NoMount",false) == false) {
+ log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST);
UnmountCdrom(CDROM);
}