Improve strip torrent root folder

Fix issue when you rename the "root item" in the "Add New Torrent" dialog
and uncheck "Create subfolder", it will create the subfolder with the
renamed name.
Fix PropertiesWidget first folder is expanded after app restart.
Strip root folder if torrent was added via magnet link.
Fix crash when you get name of torrent without metadata.
This commit is contained in:
Vladimir Golovnev (Glassez)
2016-01-04 16:00:50 +03:00
parent 4b2d8a7941
commit d413bc65ef
6 changed files with 48 additions and 35 deletions

View File

@@ -98,12 +98,9 @@ namespace BitTorrent
PieceRange filePieces(const QString &file) const;
PieceRange filePieces(int fileIndex) const;
libtorrent::file_storage files() const;
libtorrent::file_storage origFiles() const;
void renameFile(uint index, const QString &newPath);
void stripRootFolder();
void remapFiles(libtorrent::file_storage const &fileStorage);
NativePtr nativeInfo() const;
private: