Browse Source

Remove unneeded check on filenames

The same check is performed in fsutils::fileExtension()
adaptive-webui-19844
Gabriele 10 years ago
parent
commit
301294fbff
  1. 5
      src/qtlibtorrent/qbtsession.cpp

5
src/qtlibtorrent/qbtsession.cpp

@ -1755,10 +1755,7 @@ bool QBtSession::isFilePreviewPossible(const QString &hash) const {
} }
const unsigned int nbFiles = h.num_files(); const unsigned int nbFiles = h.num_files();
for (unsigned int i=0; i<nbFiles; ++i) { for (unsigned int i=0; i<nbFiles; ++i) {
QString filename = h.filename_at(i); const QString extension = fsutils::fileExtension(h.filename_at(i));
if (filename.endsWith(".!qB"))
filename.chop(4);
const QString extension = fsutils::fileExtension(filename);
if (misc::isPreviewable(extension)) if (misc::isPreviewable(extension))
return true; return true;
} }

Loading…
Cancel
Save