From 6bb6720df0976bcadbbf416e0f32d65faf7a33ae Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 24 Jan 2013 12:46:31 +0100 Subject: Fix unexpected symlink link, triggered thru broken 7z code. Change-Id: I6bb996d2b44b208137d5c1d1d558b42fb9cf7b43 Reviewed-by: Tim Jenssen --- src/libs/installer/lib7z_facade.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libs/installer/lib7z_facade.cpp') diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp index 23e0f2775..e987c7571 100644 --- a/src/libs/installer/lib7z_facade.cpp +++ b/src/libs/installer/lib7z_facade.cpp @@ -796,6 +796,13 @@ public: throw SevenZipException(QObject::tr("Could not create softlink at %1") .arg(absFilePath)); } + + // If we have a symlink, bail out after we have linked it to avoid deleting the link. + // CFileBase::Create(...) seems to broken in regard of symlink handling. If the link + // already exists, it simple does an unlink on it. So we can't set time values on the + // symlink in the following code, as COutFile::Open(...) calls former mentioned Create() + // function and thus the symlink is deleted. + return S_OK; #endif } } -- cgit v1.2.3