From bbd2cab7c4097a0776c28a5e1d4cc2f8b66b53c1 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 18 Apr 2013 17:54:09 +0200 Subject: fix error handling in 7z lib - remove an already existing symlink at extraction, because it uses QFile to get the io device and that would be the symlink target which was wrong. - try to get better 7z error output - an error would be now: "There was a problem while performing the operation: Error while extracting 'C:\Qt\qtcreator-2.7.0_test.7z': Cannot open file: D:/test/qtcreator-2.7.0_test/bin/sqldrivers/qsqlite4.dll (Access is denied.)" - move setPermissions to the end so read only files are getting the right timestamp Change-Id: I8881144660296618d443568e6974bf2721328991 Reviewed-by: Niels Weber Reviewed-by: Karsten Heimrich --- src/sdk/installerbase_p.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sdk') diff --git a/src/sdk/installerbase_p.cpp b/src/sdk/installerbase_p.cpp index dc4d82d10..0d59e541e 100644 --- a/src/sdk/installerbase_p.cpp +++ b/src/sdk/installerbase_p.cpp @@ -260,11 +260,11 @@ int InstallerBase::replaceMaintenanceToolBinary(QStringList arguments) try { Lib7z::extractArchive(&archive, QDir::tempPath()); if (!archive.remove()) { - qDebug() << QString::fromLatin1("Could not delete file %1: %2.").arg( + qDebug() << QString::fromLatin1("Could not delete file %1: %2").arg( target, archive.errorString()); } } catch (const Lib7z::SevenZipException& e) { - qDebug() << QString::fromLatin1("Error while extracting %1: %2.").arg(target, e.message()); + qDebug() << QString::fromLatin1("Error while extracting '%1': %2").arg(target, e.message()); return EXIT_FAILURE; } catch (...) { qDebug() << QString::fromLatin1("Unknown exception caught while extracting %1.").arg(target); -- cgit v1.2.3