mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +00:00
Fixed: Case where additional files are not in source directory
This commit is contained in:
parent
af805f82f4
commit
f31622de3c
1 changed files with 11 additions and 1 deletions
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue