2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that user specified path is escaped using
	util::escapePath() where it should not.
	* src/DownloadContext.cc
	* src/DownloadContext.h
pull/1/head
Tatsuhiro Tsujikawa 2010-04-13 12:51:52 +00:00
parent 1f02b65460
commit c415eb081e
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that user specified path is escaped using
util::escapePath() where it should not.
* src/DownloadContext.cc
* src/DownloadContext.h
2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Hold reference to PieceStorage when paused in order to provide Hold reference to PieceStorage when paused in order to provide

View File

@ -61,8 +61,7 @@ DownloadContext::DownloadContext(size_t pieceLength,
_downloadStartTime(0), _downloadStartTime(0),
_downloadStopTime(0) _downloadStopTime(0)
{ {
SharedHandle<FileEntry> fileEntry SharedHandle<FileEntry> fileEntry(new FileEntry(path, totalLength, 0));
(new FileEntry(util::escapePath(path), totalLength, 0));
_fileEntries.push_back(fileEntry); _fileEntries.push_back(fileEntry);
} }

View File

@ -88,7 +88,8 @@ private:
public: public:
DownloadContext(); DownloadContext();
// Convenient constructor that creates single file download. // Convenient constructor that creates single file download. path
// should be escaped with util::escapePath(...).
DownloadContext(size_t pieceLength, DownloadContext(size_t pieceLength,
uint64_t totalLength, uint64_t totalLength,
const std::string& path = A2STR::NIL); const std::string& path = A2STR::NIL);