From 7bb85af2bb3732099951b8363f9e73a59b0613e9 Mon Sep 17 00:00:00 2001
From: EndrII <EndrIIMail@gmail.com>
Date: Thu, 23 Aug 2018 18:54:57 +0300
Subject: [PATCH] fix copy folder

---
 CQtDeployer/deploy.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/CQtDeployer/deploy.cpp b/CQtDeployer/deploy.cpp
index cb6de05..15a1fe9 100644
--- a/CQtDeployer/deploy.cpp
+++ b/CQtDeployer/deploy.cpp
@@ -335,19 +335,19 @@ bool Deploy::copyFolder( QDir &from,  QDir &to, const QString& filter,
     for (auto item : list ) {
         if (QFileInfo(item).isDir()) {
 
-            if (!from.cd(item.baseName())) {
-                qWarning() <<"not open " << from.absolutePath() + QDir::separator() + item.baseName();
+            if (!from.cd(item.fileName())) {
+                qWarning() <<"not open " << from.absolutePath() + QDir::separator() + item.fileName();
                 continue;
             }
 
-            if (!QFileInfo::exists(to.absolutePath() + QDir::separator() + item.baseName()) &&
-                    !to.mkdir(item.baseName())) {
-                qWarning() <<"not create " << to.absolutePath() + QDir::separator() + item.baseName();
+            if (!QFileInfo::exists(to.absolutePath() + QDir::separator() + item.fileName()) &&
+                    !to.mkdir(item.fileName())) {
+                qWarning() <<"not create " << to.absolutePath() + QDir::separator() + item.fileName();
                 continue;
             }
 
-            if (!to.cd(item.baseName())) {
-                qWarning() <<"not open " << to.absolutePath() + QDir::separator() + item.baseName();
+            if (!to.cd(item.fileName())) {
+                qWarning() <<"not open " << to.absolutePath() + QDir::separator() + item.fileName();
                 continue;
             }