mirror of https://github.com/aria2/aria2
2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Return false if RequestGroup::isPreLocalFileCheckEnabled() == true * src/RequestGroupMan.cc (isSameFileBeingDownloaded) Return false if RequestGroup::isPreLocalFileCheckEnabled() == true * src/RequestGroup.cc (downloadFinishedByFileLength)pull/1/head
parent
cf59b13193
commit
1dc88d47ab
|
@ -1,3 +1,11 @@
|
||||||
|
2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
|
||||||
|
* src/RequestGroupMan.cc (isSameFileBeingDownloaded)
|
||||||
|
|
||||||
|
Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
|
||||||
|
* src/RequestGroup.cc (downloadFinishedByFileLength)
|
||||||
|
|
||||||
2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Added the check to see whether ares_host_callback accepts timeouts
|
Added the check to see whether ares_host_callback accepts timeouts
|
||||||
|
|
|
@ -271,7 +271,8 @@ void RequestGroup::initPieceStorage()
|
||||||
bool RequestGroup::downloadFinishedByFileLength()
|
bool RequestGroup::downloadFinishedByFileLength()
|
||||||
{
|
{
|
||||||
// assuming that a control file doesn't exist.
|
// assuming that a control file doesn't exist.
|
||||||
if(_option->get(PREF_ALLOW_OVERWRITE) == V_TRUE ||
|
if(!isPreLocalFileCheckEnabled() ||
|
||||||
|
_option->get(PREF_ALLOW_OVERWRITE) == V_TRUE ||
|
||||||
_option->get(PREF_CHECK_INTEGRITY) == V_TRUE &&
|
_option->get(PREF_CHECK_INTEGRITY) == V_TRUE &&
|
||||||
!_downloadContext->getPieceHashes().empty()) {
|
!_downloadContext->getPieceHashes().empty()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -260,6 +260,10 @@ string RequestGroupMan::formatDownloadResult(const string& status, const Request
|
||||||
|
|
||||||
bool RequestGroupMan::isSameFileBeingDownloaded(RequestGroup* requestGroup) const
|
bool RequestGroupMan::isSameFileBeingDownloaded(RequestGroup* requestGroup) const
|
||||||
{
|
{
|
||||||
|
// TODO it may be good to use dedicated method rather than use isPreLocalFileCheckEnabled
|
||||||
|
if(!requestGroup->isPreLocalFileCheckEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
for(RequestGroups::const_iterator itr = _requestGroups.begin();
|
for(RequestGroups::const_iterator itr = _requestGroups.begin();
|
||||||
itr != _requestGroups.end(); ++itr) {
|
itr != _requestGroups.end(); ++itr) {
|
||||||
if((*itr).get() != requestGroup &&
|
if((*itr).get() != requestGroup &&
|
||||||
|
|
Loading…
Reference in New Issue