From 237ec103290033103f1a2cddbf8837b8e0229ca6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 14 May 2008 15:19:26 +0000 Subject: [PATCH] 2008-05-15 Tatsuhiro Tsujikawa Defined default filename `index.html' as static const std::string * src/SingleFileDownloadContext.cc * src/SingleFileDownloadContext.h --- ChangeLog | 6 ++++++ src/SingleFileDownloadContext.cc | 4 +++- src/SingleFileDownloadContext.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 101d95a9..3e8c6b5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-15 Tatsuhiro Tsujikawa + + Defined default filename `index.html' as static const std::string + * src/SingleFileDownloadContext.cc + * src/SingleFileDownloadContext.h + 2008-05-15 Tatsuhiro Tsujikawa Defined "[MEMORY]" as static const std::string. diff --git a/src/SingleFileDownloadContext.cc b/src/SingleFileDownloadContext.cc index ca13cecb..c54a35a3 100644 --- a/src/SingleFileDownloadContext.cc +++ b/src/SingleFileDownloadContext.cc @@ -37,6 +37,8 @@ namespace aria2 { +const std::string SingleFileDownloadContext::DEFAULT_FILENAME("index.html"); + SingleFileDownloadContext::SingleFileDownloadContext(size_t pieceLength, uint64_t totalLength, const std::string& filename, @@ -56,7 +58,7 @@ void SingleFileDownloadContext::updateFileEntry() } else if(!_filename.empty()) { _fileEntry->setPath(_filename); } else { - _fileEntry->setPath("index.html"); + _fileEntry->setPath(DEFAULT_FILENAME); } } diff --git a/src/SingleFileDownloadContext.h b/src/SingleFileDownloadContext.h index ec4e87db..6eba4077 100644 --- a/src/SingleFileDownloadContext.h +++ b/src/SingleFileDownloadContext.h @@ -167,6 +167,8 @@ public: { return _contentType; } + + static const std::string DEFAULT_FILENAME; }; typedef SharedHandle SingleFileDownloadContextHandle;