summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine/Ultracopier/TransferThread.cpp
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2019-02-03 00:10:52 +0000
committerThomas Preud'homme <robotux@celest.fr>2019-02-03 00:10:52 +0000
commit9b10c21f5cad0e2ec27d23c59e65af7141a226f3 (patch)
treebf81d75a9ed990bb76488c502767600fcf7550b7 /plugins/CopyEngine/Ultracopier/TransferThread.cpp
parent594fcba67600704bee9115c86e18927b2237b304 (diff)
New upstream version 1.6.1.3
Diffstat (limited to 'plugins/CopyEngine/Ultracopier/TransferThread.cpp')
-rw-r--r--plugins/CopyEngine/Ultracopier/TransferThread.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/CopyEngine/Ultracopier/TransferThread.cpp b/plugins/CopyEngine/Ultracopier/TransferThread.cpp
index 3b748a5..210c221 100644
--- a/plugins/CopyEngine/Ultracopier/TransferThread.cpp
+++ b/plugins/CopyEngine/Ultracopier/TransferThread.cpp
@@ -642,25 +642,21 @@ bool TransferThread::checkAlwaysRename()
if(num==1)
{
if(firstRenamingRule.empty())
- newFileName=tr("%1 - copy").arg(QString::fromStdString(fileName)).toStdString();
+ newFileName=tr("%name% - copy").toStdString();
else
- {
newFileName=firstRenamingRule;
- stringreplaceAll(newFileName,"%name%",fileName);
- }
}
else
{
if(otherRenamingRule.empty())
- newFileName=tr("%1 - copy (%2)").arg(QString::fromStdString(fileName)).arg(num).toStdString();
+ newFileName=tr("%name% - copy (%number%)").toStdString();
else
- {
newFileName=otherRenamingRule;
- stringreplaceAll(newFileName,"%name%",fileName);
- stringreplaceAll(newFileName,"%number%",std::to_string(num));
- }
+ stringreplaceAll(newFileName,"%number%",std::to_string(num));
}
- newDestination.setFile(newDestination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(newFileName+suffix));
+ stringreplaceAll(newFileName,"%name%",fileName);
+ stringreplaceAll(newFileName,"%suffix%",suffix);
+ newDestination.setFile(newDestination.absolutePath()+CURRENTSEPARATOR+QString::fromStdString(newFileName));
num++;
}
while(newDestination.exists());