Browse Source

Use truncated torrent hash in temp path

adaptive-webui-19844
Vladimir Golovnev (Glassez) 9 years ago
parent
commit
b8c703b8b0
  1. 1
      src/base/bittorrent/infohash.cpp
  2. 4
      src/base/bittorrent/session.cpp

1
src/base/bittorrent/infohash.cpp

@ -68,7 +68,6 @@ bool InfoHash::isValid() const
return m_valid; return m_valid;
} }
InfoHash::operator libtorrent::sha1_hash() const InfoHash::operator libtorrent::sha1_hash() const
{ {
return m_nativeHash; return m_nativeHash;

4
src/base/bittorrent/session.cpp

@ -333,7 +333,9 @@ QString Session::tempPath() const
QString Session::torrentTempPath(const InfoHash &hash) const QString Session::torrentTempPath(const InfoHash &hash) const
{ {
return m_tempPath + QString(hash) + "/"; return m_tempPath
+ static_cast<QString>(hash).left(7)
+ "/";
} }
bool Session::isValidCategoryName(const QString &name) bool Session::isValidCategoryName(const QString &name)

Loading…
Cancel
Save