mirror of https://github.com/aria2/aria2
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined control file's version number as static const std::string. * src/DefaultBtProgressInfoFile.cc * src/DefaultBtProgressInfoFile.hpull/1/head
parent
6d0aff618d
commit
013bf02662
|
@ -1,3 +1,9 @@
|
|||
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Defined control file's version number as static const std::string.
|
||||
* src/DefaultBtProgressInfoFile.cc
|
||||
* src/DefaultBtProgressInfoFile.h
|
||||
|
||||
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Use Request::METHOD_GET
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
const std::string DefaultBtProgressInfoFile::V0000("0000");
|
||||
|
||||
static std::string createFilename(const SharedHandle<DownloadContext>& dctx)
|
||||
{
|
||||
return dctx->getActualBasePath()+".aria2";
|
||||
|
@ -179,7 +181,7 @@ void DefaultBtProgressInfoFile::load()
|
|||
try {
|
||||
unsigned char version[2];
|
||||
in.read((char*)version, sizeof(version));
|
||||
if(std::string("0000") != Util::toHex(version, sizeof(version))) {
|
||||
if(DefaultBtProgressInfoFile::V0000 != Util::toHex(version, sizeof(version))) {
|
||||
throw DlAbortEx
|
||||
(StringFormat("Unsupported ctrl file version: %s",
|
||||
Util::toHex(version, sizeof(version)).c_str()).str());
|
||||
|
|
|
@ -54,6 +54,7 @@ private:
|
|||
|
||||
bool isTorrentDownload();
|
||||
|
||||
static const std::string V0000;
|
||||
public:
|
||||
DefaultBtProgressInfoFile(const SharedHandle<DownloadContext>& btContext,
|
||||
const SharedHandle<PieceStorage>& pieceStorage,
|
||||
|
|
Loading…
Reference in New Issue