1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-12 07:48:04 +00:00

Use truncated torrent hash in temp path

This commit is contained in:
Vladimir Golovnev (Glassez) 2016-04-23 21:01:56 +03:00
parent 850556fdfa
commit b8c703b8b0
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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)