Selaa lähdekoodia

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
Tatsuhiro Tsujikawa 15 vuotta sitten
vanhempi
commit
c415eb081e
3 muutettua tiedostoa jossa 10 lisäystä ja 3 poistoa
  1. 7 0
      ChangeLog
  2. 1 2
      src/DownloadContext.cc
  3. 2 1
      src/DownloadContext.h

+ 7 - 0
ChangeLog

@@ -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>
 
 	Hold reference to PieceStorage when paused in order to provide

+ 1 - 2
src/DownloadContext.cc

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

+ 2 - 1
src/DownloadContext.h

@@ -88,7 +88,8 @@ private:
 public:
   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,
                   uint64_t totalLength,
                   const std::string& path = A2STR::NIL);