summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2018-03-01 22:39:56 +0000
committerThomas Preud'homme <robotux@celest.fr>2018-03-01 22:39:56 +0000
commit5b240dd94561bef6a030b25cfa70838053ad53b2 (patch)
tree417868397f3c2c7386773f55096a9aa5f8856990 /plugins/CopyEngine
parentbd56579c7d9de94c17287adefa118290e6b7ba33 (diff)
New upstream version 1.4.0.4
Diffstat (limited to 'plugins/CopyEngine')
-rw-r--r--plugins/CopyEngine/Rsync/informations.xml2
-rw-r--r--plugins/CopyEngine/Ultracopier/DriveManagement.cpp1
-rw-r--r--plugins/CopyEngine/Ultracopier/ListThread.cpp25
-rw-r--r--plugins/CopyEngine/Ultracopier/informations.xml2
4 files changed, 15 insertions, 15 deletions
diff --git a/plugins/CopyEngine/Rsync/informations.xml b/plugins/CopyEngine/Rsync/informations.xml
index 46cbf7e..17c9f26 100644
--- a/plugins/CopyEngine/Rsync/informations.xml
+++ b/plugins/CopyEngine/Rsync/informations.xml
@@ -14,7 +14,7 @@
<!-- Detailed description -->
<description xml:lang="en"><![CDATA[Copy engine of Ultracopier which uses rsync as backend]]></description>
<!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number -->
- <version>1.4.0.3</version>
+ <version>1.4.0.4</version>
<!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. -->
<name>Rsync</name>
<!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. -->
diff --git a/plugins/CopyEngine/Ultracopier/DriveManagement.cpp b/plugins/CopyEngine/Ultracopier/DriveManagement.cpp
index 8deaf3c..f25836f 100644
--- a/plugins/CopyEngine/Ultracopier/DriveManagement.cpp
+++ b/plugins/CopyEngine/Ultracopier/DriveManagement.cpp
@@ -19,6 +19,7 @@ DriveManagement::DriveManagement()
}
//get drive of an file or folder
+/// \todo do network drive support for windows
std::string DriveManagement::getDrive(const std::string &fileOrFolder) const
{
const std::string &inode=QDir::toNativeSeparators(QString::fromStdString(fileOrFolder)).toStdString();
diff --git a/plugins/CopyEngine/Ultracopier/ListThread.cpp b/plugins/CopyEngine/Ultracopier/ListThread.cpp
index 4b9cde5..8d47326 100644
--- a/plugins/CopyEngine/Ultracopier/ListThread.cpp
+++ b/plugins/CopyEngine/Ultracopier/ListThread.cpp
@@ -1160,21 +1160,20 @@ uint64_t ListThread::addToTransfer(const QFileInfo& source,const QFileInfo& dest
if(!source.isSymLink())
size=source.size();
const std::string &drive=driveManagement.getDrive(destination.absoluteFilePath().toStdString());
- if(drive.empty())
- abort();
- if(mode!=Ultracopier::Move || drive!=driveManagement.getDrive(source.absoluteFilePath().toStdString()))
- {
- if(requiredSpace.find(drive)!=requiredSpace.cend())
+ if(!drive.empty())//can be a network drive
+ if(mode!=Ultracopier::Move || drive!=driveManagement.getDrive(source.absoluteFilePath().toStdString()))
{
- requiredSpace[drive]+=size;
- ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed add: %1, space needed: %2, on: %3").arg(size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString());
- }
- else
- {
- requiredSpace[drive]=size;
- ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set space %1 needed, on: %2").arg(size).arg(QString::fromStdString(drive)).toStdString());
+ if(requiredSpace.find(drive)!=requiredSpace.cend())
+ {
+ requiredSpace[drive]+=size;
+ ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("space needed add: %1, space needed: %2, on: %3").arg(size).arg(requiredSpace.at(drive)).arg(QString::fromStdString(drive)).toStdString());
+ }
+ else
+ {
+ requiredSpace[drive]=size;
+ ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("set space %1 needed, on: %2").arg(size).arg(QString::fromStdString(drive)).toStdString());
+ }
}
- }
bytesToTransfer+= size;
ActionToDoTransfer temp;
temp.id = generateIdNumber();
diff --git a/plugins/CopyEngine/Ultracopier/informations.xml b/plugins/CopyEngine/Ultracopier/informations.xml
index 61e04e0..7968ca8 100644
--- a/plugins/CopyEngine/Ultracopier/informations.xml
+++ b/plugins/CopyEngine/Ultracopier/informations.xml
@@ -17,7 +17,7 @@
<description xml:lang="en"><![CDATA[Copy engine of Ultracopier, do in Qt for all platform, and copy by stream]]></description>
<description xml:lang="fr"><![CDATA[Moteur de copie d'ultracopier, fait en Qt pour toutes les plateformes, et copie par stream]]></description>
<!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number -->
- <version>1.4.0.3</version>
+ <version>1.4.0.4</version>
<!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. -->
<name>Ultracopier</name>
<!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. -->