From 6debc1e958f4b36b182b941e2a8dd6af3272955d Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Mon, 18 Mar 2013 17:26:46 +0400 Subject: [PATCH] Fix unhandled exception when trying to create torrents from files/folder in disk root. --- src/torrentcreator/torrentcreatorthread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/torrentcreator/torrentcreatorthread.cpp b/src/torrentcreator/torrentcreatorthread.cpp index ee238899e..be4a17950 100644 --- a/src/torrentcreator/torrentcreatorthread.cpp +++ b/src/torrentcreator/torrentcreatorthread.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include "torrentcreatorthread.h" #include "fs_utils.h" @@ -128,7 +129,7 @@ void TorrentCreatorThread::run() { } if (abort) return; // calculate the hash for all pieces - const QString parent_path = fsutils::branchPath(input_path); + const QString parent_path = fsutils::branchPath(input_path) + QDir::separator(); set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind(&sendProgressUpdateSignal, _1, t.num_pieces(), this)); // Set qBittorrent as creator and add user comment to // torrent_info structure