mirror of https://github.com/aria2/aria2
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined default filename `index.html' as static const std::string * src/SingleFileDownloadContext.cc * src/SingleFileDownloadContext.hpull/1/head
parent
f26d64ce49
commit
237ec10329
|
@ -1,3 +1,9 @@
|
||||||
|
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Defined default filename `index.html' as static const std::string
|
||||||
|
* src/SingleFileDownloadContext.cc
|
||||||
|
* src/SingleFileDownloadContext.h
|
||||||
|
|
||||||
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Defined "[MEMORY]" as static const std::string.
|
Defined "[MEMORY]" as static const std::string.
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
const std::string SingleFileDownloadContext::DEFAULT_FILENAME("index.html");
|
||||||
|
|
||||||
SingleFileDownloadContext::SingleFileDownloadContext(size_t pieceLength,
|
SingleFileDownloadContext::SingleFileDownloadContext(size_t pieceLength,
|
||||||
uint64_t totalLength,
|
uint64_t totalLength,
|
||||||
const std::string& filename,
|
const std::string& filename,
|
||||||
|
@ -56,7 +58,7 @@ void SingleFileDownloadContext::updateFileEntry()
|
||||||
} else if(!_filename.empty()) {
|
} else if(!_filename.empty()) {
|
||||||
_fileEntry->setPath(_filename);
|
_fileEntry->setPath(_filename);
|
||||||
} else {
|
} else {
|
||||||
_fileEntry->setPath("index.html");
|
_fileEntry->setPath(DEFAULT_FILENAME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,8 @@ public:
|
||||||
{
|
{
|
||||||
return _contentType;
|
return _contentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const std::string DEFAULT_FILENAME;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SharedHandle<SingleFileDownloadContext> SingleFileDownloadContextHandle;
|
typedef SharedHandle<SingleFileDownloadContext> SingleFileDownloadContextHandle;
|
||||||
|
|
Loading…
Reference in New Issue