Commit 74dade3e authored by Luca Giambonini's avatar Luca Giambonini

changed from to replacedpkg to make more readable the code

parent d2a872a2
......@@ -82,14 +82,14 @@ void PlainReplaceOperation::run()
const int numberPackages = d->replaces.count();
for (int i = 0; i != numberPackages; ++i) {
Package * from = d->replaces[i];
Package * replacedpkg = d->replaces[i];
// Remove first
// Remove all files
int idx = 0;
int filesSize = from->retrieveFiles().size();
QMap<QString, QString> backup = from->backupFiles();
int filesSize = replacedpkg->retrieveFiles().size();
QMap<QString, QString> backup = replacedpkg->backupFiles();
foreach (QString file, from->retrieveFiles()) {
foreach (QString file, replacedpkg->retrieveFiles()) {
if ((file.endsWith('/') && !QFileInfo(file).isSymLink()) || (backup.contains(file) && !backup[file].isEmpty())) {
++idx;
// It's a directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment