diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-02-13 11:28:42 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-02-13 11:28:42 +0000 |
| commit | 34d7cd7a7046798fde08fb5df12ee92156546515 (patch) | |
| tree | 325282e832726459c5bf9c2d41d1e014511ee3c2 /src/ProtocolDetector.cc | |
| parent | 9d27eb53f59384eab7e9f11e5f327b2b650949d2 (diff) | |
2009-02-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Open file in binary mode.
* src/CookieStorage.cc
* src/DHTSetup.cc
* src/DHTUtil.cc
* src/Netrc.cc
* src/NsCookieParser.cc
* src/ProtocolDetector.cc
* src/RequestGroupMan.cc
* src/Signature.cc
* src/bencode.cc
* src/download_helper.cc
* src/option_processing.cc
* test/CookieParserTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/FileTest.cc
* test/GZipDecoderTest.cc
* test/RequestGroupManTest.cc
* test/SignatureTest.cc
* test/SingleFileAllocationIteratorTest.cc
* test/UriListParserTest.cc
Diffstat (limited to 'src/ProtocolDetector.cc')
| -rw-r--r-- | src/ProtocolDetector.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ProtocolDetector.cc b/src/ProtocolDetector.cc index ee743c65..9937ac03 100644 --- a/src/ProtocolDetector.cc +++ b/src/ProtocolDetector.cc @@ -55,7 +55,7 @@ bool ProtocolDetector::guessTorrentFile(const std::string& uri) const if(!File(uri).isFile()) { return false; } - std::ifstream in(uri.c_str()); + std::ifstream in(uri.c_str(), std::ios::binary); if(in) { char head; in >> head; @@ -70,7 +70,7 @@ bool ProtocolDetector::guessMetalinkFile(const std::string& uri) const if(!File(uri).isFile()) { return false; } - std::ifstream in(uri.c_str()); + std::ifstream in(uri.c_str(), std::ios::binary); if(in) { char head[6]; in >> std::setw(6) >> head; |
