comparison installer.cpp @ 68:d70c50c4a07c

Permissions
author Chris Cannam
date Thu, 13 Feb 2020 11:34:45 +0000
parents 38cd115c91d4
children 103ee4b82f30
comparison
equal deleted inserted replaced
67:38cd115c91d4 68:d70c50c4a07c
439 << " to packaged versions " 439 << " to packaged versions "
440 << versionsString(info.pluginVersions) 440 << versionsString(info.pluginVersions)
441 << ": isLibraryNewer(installed, packaged) returns " 441 << ": isLibraryNewer(installed, packaged) returns "
442 << isLibraryNewer(installed, info.pluginVersions) 442 << isLibraryNewer(installed, info.pluginVersions)
443 << endl; 443 << endl;
444 } else {
445 SVCERR << "Note: library " << library
446 << " is not yet installed, not comparing versions" << endl;
444 } 447 }
445 448
446 SVCERR << "Copying " << library.toStdString() << " to " 449 SVCERR << "Copying " << library.toStdString() << " to "
447 << destination.toStdString() << "..." << endl; 450 << destination.toStdString() << "..." << endl;
448 if (!f.copy(destination)) { 451 if (!f.copy(destination)) {
470 << destination.toStdString() << "..." << endl; 473 << destination.toStdString() << "..." << endl;
471 if (!QFile(source + "/" + e).copy(destination)) { 474 if (!QFile(source + "/" + e).copy(destination)) {
472 SVCERR << "Failed to copy " << e.toStdString() 475 SVCERR << "Failed to copy " << e.toStdString()
473 << " to target " << destination.toStdString() 476 << " to target " << destination.toStdString()
474 << " (ignoring)" << endl; 477 << " (ignoring)" << endl;
478 continue;
479 }
480 if (!QFile::setPermissions
481 (destination,
482 QFile::ReadOwner | QFile::WriteOwner |
483 QFile::ReadGroup |
484 QFile::ReadOther)) {
485 SVCERR << "Failed to set permissions on "
486 << destination.toStdString()
487 << " (ignoring)" << endl;
488 continue;
475 } 489 }
476 } 490 }
477 } 491 }
478 492
479 map<QString, LibraryInfo> 493 map<QString, LibraryInfo>