← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2137: Fix unnecessary move of downloaded filelists

 

------------------------------------------------------------
revno: 2137
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sun 2010-05-09 23:51:12 +0200
message:
  Fix unnecessary move of downloaded filelists
modified:
  changelog.txt
  dcpp/QueueManager.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt	2010-05-09 11:37:51 +0000
+++ changelog.txt	2010-05-09 21:51:12 +0000
@@ -16,6 +16,8 @@
 * [L#505450] Extend %[line:] to create combo boxes (thanks sulan)
 * Compilation fixes for OpenSolaris (thanks andrew browne)
 * Help updates (poy, emtee)
+* [L#550300] Fix a possible file corruption (thanks bigmuscle)
+* [L#551184] Fix unnecessary move of downloaded filelists (emtee)
 
 -- 0.761 2010-03-14 --
 * [L#533840] Fix crashes with themed menus (poy)

=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp	2010-04-18 04:32:43 +0000
+++ dcpp/QueueManager.cpp	2010-05-09 21:51:12 +0000
@@ -1135,7 +1135,7 @@
 
 						if(aDownload->getType() != Transfer::TYPE_FILE || q->isFinished()) {
 							// Check if we need to move the file
-							if( !aDownload->getTempTarget().empty() && (Util::stricmp(aDownload->getPath().c_str(), aDownload->getTempTarget().c_str()) != 0) ) {
+							if( aDownload->getType() == Transfer::TYPE_FILE && !aDownload->getTempTarget().empty() && (Util::stricmp(aDownload->getPath().c_str(), aDownload->getTempTarget().c_str()) != 0) ) {
 								moveFile(aDownload->getTempTarget(), aDownload->getPath());
 							}