{"action":"created","comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/60104907","id":60104907,"diff_hunk":"@@ -1727,14 +1722,22 @@ void TorrentHandle::appendExtensionsToIncompleteFiles()\n {\n     QVector<qreal> fp = filesProgress();\n     for (int i = 0; i < filesCount(); ++i) {\n+        QString name = filePath(i);\n         if ((fileSize(i) > 0) && (fp[i] < 1)) {\n-            const QString name = filePath(i);\n             if (!name.endsWith(QB_EXT)) {\n                 const QString newName = name + QB_EXT;\n-                qDebug(\"Renaming %s to %s\", qPrintable(name), qPrintable(newName));\n+                qDebug() << \"Renaming\" << name << \"to\" << newName;\n                 renameFile(i, newName);\n             }\n         }\n+        else {\n+            if (name.endsWith(QB_EXT)) {\n+                const QString oldName = name;\n+                name.chop(QString(QB_EXT).size());\n+                qDebug() << \"Renaming\" << oldName << \"to\" << name;","path":"src/base/bittorrent/torrenthandle.cpp","position":43,"original_position":43,"commit_id":"8e9b0d97ec52888f087ff6cfcc0c03f3ca5bf739","original_commit_id":"8e9b0d97ec52888f087ff6cfcc0c03f3ca5bf739","user":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"body":"Spaces here too","created_at":"2016-04-18T18:01:31Z","updated_at":"2016-04-18T18:01:31Z","html_url":"https://github.com/qbittorrent/qBittorrent/pull/5141#discussion_r60104907","pull_request_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141","_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/60104907"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/5141#discussion_r60104907"},"pull_request":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141"}}},"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141","id":66869841,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/5141","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/5141.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/5141.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5141","number":5141,"state":"open","locked":false,"title":"Fix torrent adding with existing data","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"body":"Check files in destination directory even \"Keep incomplete torrents in\" or/and \"Append .!qB extension\" are enabled.\r\nMoving to temp folder and appending .!qB extension only after initial checking.","created_at":"2016-04-18T15:09:54Z","updated_at":"2016-04-18T18:01:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6d70d7203acba1335978cb2cec4cc6b159ed5bd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5141/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/8e9b0d97ec52888f087ff6cfcc0c03f3ca5bf739","head":{"label":"glassez:recheck","ref":"recheck","sha":"8e9b0d97ec52888f087ff6cfcc0c03f3ca5bf739","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"repo":{"id":11788320,"name":"qBittorrent","full_name":"glassez/qBittorrent","owner":{"login":"glassez","id":5063477,"avatar_url":"https://avatars.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glassez/qBittorrent","description":"qBittorrent BitTorrent client","fork":true,"url":"https://api.github.com/repos/glassez/qBittorrent","forks_url":"https://api.github.com/repos/glassez/qBittorrent/forks","keys_url":"https://api.github.com/repos/glassez/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glassez/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glassez/qBittorrent/teams","hooks_url":"https://api.github.com/repos/glassez/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/glassez/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/glassez/qBittorrent/events","assignees_url":"https://api.github.com/repos/glassez/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/glassez/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/glassez/qBittorrent/tags","blobs_url":"https://api.github.com/repos/glassez/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glassez/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glassez/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/glassez/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glassez/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/glassez/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/glassez/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/glassez/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/glassez/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/glassez/qBittorrent/subscription","commits_url":"https://api.github.com/repos/glassez/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/glassez/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/glassez/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/glassez/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/glassez/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/glassez/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glassez/qBittorrent/merges","archive_url":"https://api.github.com/repos/glassez/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glassez/qBittorrent/downloads","issues_url":"https://api.github.com/repos/glassez/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/glassez/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/glassez/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/glassez/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glassez/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/glassez/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/glassez/qBittorrent/deployments","created_at":"2013-07-31T10:19:53Z","updated_at":"2015-02-06T06:53:17Z","pushed_at":"2016-04-18T15:02:18Z","git_url":"git://github.com/glassez/qBittorrent.git","ssh_url":"git@github.com:glassez/qBittorrent.git","clone_url":"https://github.com/glassez/qBittorrent.git","svn_url":"https://github.com/glassez/qBittorrent","homepage":"http://www.qbittorrent.org","size":115323,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"qbittorrent:master","ref":"master","sha":"f22aee2bff72c5ea60d122aa9de984ae82d7f423","user":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"repo":{"id":3351871,"name":"qBittorrent","full_name":"qbittorrent/qBittorrent","owner":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qbittorrent/qBittorrent","description":"qBittorrent BitTorrent client","fork":false,"url":"https://api.github.com/repos/qbittorrent/qBittorrent","forks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/forks","keys_url":"https://api.github.com/repos/qbittorrent/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qbittorrent/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qbittorrent/qBittorrent/teams","hooks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/events","assignees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/qbittorrent/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/tags","blobs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/qbittorrent/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscription","commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/qbittorrent/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qbittorrent/qBittorrent/merges","archive_url":"https://api.github.com/repos/qbittorrent/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qbittorrent/qBittorrent/downloads","issues_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/qbittorrent/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/qbittorrent/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/qbittorrent/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/deployments","created_at":"2012-02-04T09:37:46Z","updated_at":"2016-04-18T17:43:46Z","pushed_at":"2016-04-18T16:41:57Z","git_url":"git://github.com/qbittorrent/qBittorrent.git","ssh_url":"git@github.com:qbittorrent/qBittorrent.git","clone_url":"https://github.com/qbittorrent/qBittorrent.git","svn_url":"https://github.com/qbittorrent/qBittorrent","homepage":"http://www.qbittorrent.org","size":138063,"stargazers_count":1676,"watchers_count":1676,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":467,"mirror_url":null,"open_issues_count":1469,"forks":467,"open_issues":1469,"watchers":1676,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/5141"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5141"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5141/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5141/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/8e9b0d97ec52888f087ff6cfcc0c03f3ca5bf739"}}}}