From 1162edcb46241cf2c7c2f0b8569377f0db9f543d Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 13:37:43 +0200 Subject: [PATCH] Fixed: Case where additional files are not in source directory --HG-- branch : develop --- .../tools/client/ryzom_installer/src/filescopier.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/filescopier.cpp b/code/ryzom/tools/client/ryzom_installer/src/filescopier.cpp index 470790d4a..b6ca5c4e9 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/filescopier.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/filescopier.cpp @@ -75,8 +75,18 @@ void CFilesCopier::getFile(const QFileInfo &fileInfo, const QDir &srcDir, FilesT // full path to file QString fullPath = fileInfo.absoluteFilePath(); + QString relativePath = srcDir.relativeFilePath(fullPath); + + QFileInfo relativeFileInfo(relativePath); + + // correct absolute path + if (relativeFileInfo.isAbsolute()) + { + relativePath = relativeFileInfo.fileName(); + } + // full path where to copy file - QString dstPath = m_destinationDirectory + "/" + srcDir.relativeFilePath(fullPath); + QString dstPath = m_destinationDirectory + "/" + relativePath; if (fileInfo.isDir()) {