{"action":"created","issue":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/499","repository_url":"https://api.github.com/repos/arvidn/libtorrent","labels_url":"https://api.github.com/repos/arvidn/libtorrent/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/499/comments","events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/499/events","html_url":"https://github.com/arvidn/libtorrent/issues/499","id":136789120,"number":499,"title":"torrent_info::rename_file unable to strip .torrent \"name\" part","user":{"login":"ajax16384","id":340593,"avatar_url":"https://avatars.githubusercontent.com/u/340593?v=3","gravatar_id":"","url":"https://api.github.com/users/ajax16384","html_url":"https://github.com/ajax16384","followers_url":"https://api.github.com/users/ajax16384/followers","following_url":"https://api.github.com/users/ajax16384/following{/other_user}","gists_url":"https://api.github.com/users/ajax16384/gists{/gist_id}","starred_url":"https://api.github.com/users/ajax16384/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajax16384/subscriptions","organizations_url":"https://api.github.com/users/ajax16384/orgs","repos_url":"https://api.github.com/users/ajax16384/repos","events_url":"https://api.github.com/users/ajax16384/events{/privacy}","received_events_url":"https://api.github.com/users/ajax16384/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-26T19:22:57Z","updated_at":"2016-02-26T23:48:12Z","closed_at":null,"body":"````c++\r\n\t\tvoid rename_file(int index, std::string const& new_filename)\r\n\t\t{\r\n\t\t\tTORRENT_ASSERT(is_loaded());\r\n-\t\t\tif (m_files.file_name(index) == new_filename) return;\r\n+\t\t\tif (m_files.file_path(index) == new_filename) return;\r\n\r\n````\r\nfor non-single file torrent \"file_storage::file_name()\" always returns string without .torrent \"name\" part. so any attempt to rename file to same relative name but with striped root part will fail.\r\nfile_name->file_path should fix this issue."},"comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments/189529415","html_url":"https://github.com/arvidn/libtorrent/issues/499#issuecomment-189529415","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/499","id":189529415,"user":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T23:48:12Z","updated_at":"2016-02-26T23:48:12Z","body":"which file is that in and which version? I can't find a rename_file() function that looks like that in master, RC_1_1 nor RC_1_0"}}