mirror of https://github.com/aria2/aria2
2008-12-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rename file by appending digits if a local file exists and its file size is larger than that of remote file with --continue option. The old implementation just throws exception in such case. * src/RequestGroup.ccpull/1/head
parent
22d91f1729
commit
e9d648cb7b
|
@ -1,3 +1,10 @@
|
|||
2008-12-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Rename file by appending digits if a local file exists and its
|
||||
file size is larger than that of remote file with --continue
|
||||
option. The old implementation just throws exception in such case.
|
||||
* src/RequestGroup.cc
|
||||
|
||||
2008-12-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that download progress summary is not printed in the
|
||||
|
|
|
@ -406,14 +406,8 @@ void RequestGroup::loadAndOpenFile(const BtProgressInfoFileHandle& progressInfoF
|
|||
_pieceStorage->getDiskAdaptor()->openExistingFile();
|
||||
} else {
|
||||
File outfile(getFilePath());
|
||||
if(outfile.exists() && _option->getAsBool(PREF_CONTINUE)) {
|
||||
if(getTotalLength() < outfile.size()) {
|
||||
throw DlAbortEx
|
||||
(StringFormat(EX_FILE_LENGTH_MISMATCH_BETWEEN_LOCAL_AND_REMOTE,
|
||||
getFilePath().c_str(),
|
||||
Util::itos(outfile.size()).c_str(),
|
||||
Util::itos(getTotalLength()).c_str()).str());
|
||||
}
|
||||
if(outfile.exists() && _option->getAsBool(PREF_CONTINUE) &&
|
||||
outfile.size() <= getTotalLength()) {
|
||||
_pieceStorage->getDiskAdaptor()->openExistingFile();
|
||||
_pieceStorage->markPiecesDone(outfile.size());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue