{"action":"created","comment":{"url":"https://api.github.com/repos/geany/geany/pulls/comments/25137359","id":25137359,"diff_hunk":"@@ -977,26 +964,19 @@ static GPid build_run_cmd(GeanyDocument *doc, guint cmdindex)\n \n \t\tif (vc->skip_run_script)\n \t\t{\n-\t\t\tSETPTR(vte_cmd_nonscript, utils_get_utf8_from_locale(vte_cmd_nonscript));\n-\t\t\tvte_cmd = g_strconcat(vte_cmd_nonscript, \"\\n\", NULL);\n-\t\t\tg_free(vte_cmd_nonscript);\n+\t\t\tSETPTR(run_cmd, utils_get_utf8_from_locale(run_cmd));\n+\t\t\tvte_cmd = g_strconcat(run_cmd, \"\\n\", NULL);\n \t\t}\n \t\telse\n-\t\t\tvte_cmd = g_strconcat(\"\\n/bin/sh \", RUN_SCRIPT_CMD, \"\\n\", NULL);\n+\t\t\tvte_cmd = g_strconcat(\"\\n/bin/sh \", run_cmd, \"\\n\", NULL);\n \n-\t\t/* change into current directory if it is not done by default */\n-\t\tif (! vc->follow_path)\n-\t\t{\n-\t\t\t/* we need to convert the working_dir back to UTF-8 because the VTE expects it */\n-\t\t\tgchar *utf8_working_dir = utils_get_utf8_from_locale(working_dir);","path":"src/build.c","position":120,"original_position":120,"commit_id":"02d60c56229d83adeffc8343cc7ab6fdef5822b7","original_commit_id":"02d60c56229d83adeffc8343cc7ab6fdef5822b7","user":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"body":"This conversion is wrong IMO because working_dir should be in UTF8 already.","created_at":"2015-02-22T22:09:34Z","updated_at":"2015-02-22T22:09:34Z","html_url":"https://github.com/geany/geany/pull/426#discussion_r25137359","pull_request_url":"https://api.github.com/repos/geany/geany/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/geany/geany/pulls/comments/25137359"},"html":{"href":"https://github.com/geany/geany/pull/426#discussion_r25137359"},"pull_request":{"href":"https://api.github.com/repos/geany/geany/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/geany/geany/pulls/426","id":29777695,"html_url":"https://github.com/geany/geany/pull/426","diff_url":"https://github.com/geany/geany/pull/426.diff","patch_url":"https://github.com/geany/geany/pull/426.patch","issue_url":"https://api.github.com/repos/geany/geany/issues/426","number":426,"state":"open","locked":false,"title":"Create geany_run_script.sh in the temporary directory instead of the wor...","user":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"body":"...king directory\r\n\r\nUnder some conditions, geany_run_script.sh is not deleted and we\r\nhave no means to detect this in Geany (e.g. when the terminal emulator\r\nis started correctly but it fails to execute the script for some reason).\r\nIn this case it is better to keep the garbage in /tmp than the working\r\ndirectory. Apart from that, it eliminates potential transfer of the run script\r\nover a NFS and eliminates the visibility of the script in working directory\r\non Windows.\r\n\r\nApart from that this patch fixes some locale/utf8 conversion problems\r\nand other subtle problems with the previous implementation.\r\n\r\n(I ran into this by having \"jhbuild shell\" inside my .bashrc in which case\r\nthe terminal didn't start the run script.)\r\n\r\nI'll mark some places in the code which are worth attention - even though\r\nthe patch is simple in principle, there are many subtle things which\r\ncould go wrong. I hope I fixed some which were there but it is also\r\npossible I introduced some.","created_at":"2015-02-22T21:56:56Z","updated_at":"2015-02-22T22:09:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a220c1abbdd6262ecb4fcf94cb4576d07828cf60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geany/geany/pulls/426/commits","review_comments_url":"https://api.github.com/repos/geany/geany/pulls/426/comments","review_comment_url":"https://api.github.com/repos/geany/geany/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geany/geany/issues/426/comments","statuses_url":"https://api.github.com/repos/geany/geany/statuses/02d60c56229d83adeffc8343cc7ab6fdef5822b7","head":{"label":"techee:run_script_tmp","ref":"run_script_tmp","sha":"02d60c56229d83adeffc8343cc7ab6fdef5822b7","user":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"repo":{"id":24825705,"name":"geany","full_name":"techee/geany","owner":{"login":"techee","id":713965,"avatar_url":"https://avatars.githubusercontent.com/u/713965?v=3","gravatar_id":"","url":"https://api.github.com/users/techee","html_url":"https://github.com/techee","followers_url":"https://api.github.com/users/techee/followers","following_url":"https://api.github.com/users/techee/following{/other_user}","gists_url":"https://api.github.com/users/techee/gists{/gist_id}","starred_url":"https://api.github.com/users/techee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techee/subscriptions","organizations_url":"https://api.github.com/users/techee/orgs","repos_url":"https://api.github.com/users/techee/repos","events_url":"https://api.github.com/users/techee/events{/privacy}","received_events_url":"https://api.github.com/users/techee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/techee/geany","description":"A fast and lightweight IDE","fork":true,"url":"https://api.github.com/repos/techee/geany","forks_url":"https://api.github.com/repos/techee/geany/forks","keys_url":"https://api.github.com/repos/techee/geany/keys{/key_id}","collaborators_url":"https://api.github.com/repos/techee/geany/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/techee/geany/teams","hooks_url":"https://api.github.com/repos/techee/geany/hooks","issue_events_url":"https://api.github.com/repos/techee/geany/issues/events{/number}","events_url":"https://api.github.com/repos/techee/geany/events","assignees_url":"https://api.github.com/repos/techee/geany/assignees{/user}","branches_url":"https://api.github.com/repos/techee/geany/branches{/branch}","tags_url":"https://api.github.com/repos/techee/geany/tags","blobs_url":"https://api.github.com/repos/techee/geany/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/techee/geany/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/techee/geany/git/refs{/sha}","trees_url":"https://api.github.com/repos/techee/geany/git/trees{/sha}","statuses_url":"https://api.github.com/repos/techee/geany/statuses/{sha}","languages_url":"https://api.github.com/repos/techee/geany/languages","stargazers_url":"https://api.github.com/repos/techee/geany/stargazers","contributors_url":"https://api.github.com/repos/techee/geany/contributors","subscribers_url":"https://api.github.com/repos/techee/geany/subscribers","subscription_url":"https://api.github.com/repos/techee/geany/subscription","commits_url":"https://api.github.com/repos/techee/geany/commits{/sha}","git_commits_url":"https://api.github.com/repos/techee/geany/git/commits{/sha}","comments_url":"https://api.github.com/repos/techee/geany/comments{/number}","issue_comment_url":"https://api.github.com/repos/techee/geany/issues/comments{/number}","contents_url":"https://api.github.com/repos/techee/geany/contents/{+path}","compare_url":"https://api.github.com/repos/techee/geany/compare/{base}...{head}","merges_url":"https://api.github.com/repos/techee/geany/merges","archive_url":"https://api.github.com/repos/techee/geany/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/techee/geany/downloads","issues_url":"https://api.github.com/repos/techee/geany/issues{/number}","pulls_url":"https://api.github.com/repos/techee/geany/pulls{/number}","milestones_url":"https://api.github.com/repos/techee/geany/milestones{/number}","notifications_url":"https://api.github.com/repos/techee/geany/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/techee/geany/labels{/name}","releases_url":"https://api.github.com/repos/techee/geany/releases{/id}","created_at":"2014-10-05T20:38:07Z","updated_at":"2014-10-05T20:40:37Z","pushed_at":"2015-02-22T21:52:38Z","git_url":"git://github.com/techee/geany.git","ssh_url":"git@github.com:techee/geany.git","clone_url":"https://github.com/techee/geany.git","svn_url":"https://github.com/techee/geany","homepage":"http://www.geany.org","size":36785,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"geany:master","ref":"master","sha":"8aa4f11cad2cf8404bc58f93464fdcd2140a2f69","user":{"login":"geany","id":1108795,"avatar_url":"https://avatars.githubusercontent.com/u/1108795?v=3","gravatar_id":"","url":"https://api.github.com/users/geany","html_url":"https://github.com/geany","followers_url":"https://api.github.com/users/geany/followers","following_url":"https://api.github.com/users/geany/following{/other_user}","gists_url":"https://api.github.com/users/geany/gists{/gist_id}","starred_url":"https://api.github.com/users/geany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geany/subscriptions","organizations_url":"https://api.github.com/users/geany/orgs","repos_url":"https://api.github.com/users/geany/repos","events_url":"https://api.github.com/users/geany/events{/privacy}","received_events_url":"https://api.github.com/users/geany/received_events","type":"Organization","site_admin":false},"repo":{"id":2532922,"name":"geany","full_name":"geany/geany","owner":{"login":"geany","id":1108795,"avatar_url":"https://avatars.githubusercontent.com/u/1108795?v=3","gravatar_id":"","url":"https://api.github.com/users/geany","html_url":"https://github.com/geany","followers_url":"https://api.github.com/users/geany/followers","following_url":"https://api.github.com/users/geany/following{/other_user}","gists_url":"https://api.github.com/users/geany/gists{/gist_id}","starred_url":"https://api.github.com/users/geany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geany/subscriptions","organizations_url":"https://api.github.com/users/geany/orgs","repos_url":"https://api.github.com/users/geany/repos","events_url":"https://api.github.com/users/geany/events{/privacy}","received_events_url":"https://api.github.com/users/geany/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geany/geany","description":"A fast and lightweight IDE","fork":false,"url":"https://api.github.com/repos/geany/geany","forks_url":"https://api.github.com/repos/geany/geany/forks","keys_url":"https://api.github.com/repos/geany/geany/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geany/geany/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geany/geany/teams","hooks_url":"https://api.github.com/repos/geany/geany/hooks","issue_events_url":"https://api.github.com/repos/geany/geany/issues/events{/number}","events_url":"https://api.github.com/repos/geany/geany/events","assignees_url":"https://api.github.com/repos/geany/geany/assignees{/user}","branches_url":"https://api.github.com/repos/geany/geany/branches{/branch}","tags_url":"https://api.github.com/repos/geany/geany/tags","blobs_url":"https://api.github.com/repos/geany/geany/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geany/geany/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geany/geany/git/refs{/sha}","trees_url":"https://api.github.com/repos/geany/geany/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geany/geany/statuses/{sha}","languages_url":"https://api.github.com/repos/geany/geany/languages","stargazers_url":"https://api.github.com/repos/geany/geany/stargazers","contributors_url":"https://api.github.com/repos/geany/geany/contributors","subscribers_url":"https://api.github.com/repos/geany/geany/subscribers","subscription_url":"https://api.github.com/repos/geany/geany/subscription","commits_url":"https://api.github.com/repos/geany/geany/commits{/sha}","git_commits_url":"https://api.github.com/repos/geany/geany/git/commits{/sha}","comments_url":"https://api.github.com/repos/geany/geany/comments{/number}","issue_comment_url":"https://api.github.com/repos/geany/geany/issues/comments{/number}","contents_url":"https://api.github.com/repos/geany/geany/contents/{+path}","compare_url":"https://api.github.com/repos/geany/geany/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geany/geany/merges","archive_url":"https://api.github.com/repos/geany/geany/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geany/geany/downloads","issues_url":"https://api.github.com/repos/geany/geany/issues{/number}","pulls_url":"https://api.github.com/repos/geany/geany/pulls{/number}","milestones_url":"https://api.github.com/repos/geany/geany/milestones{/number}","notifications_url":"https://api.github.com/repos/geany/geany/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geany/geany/labels{/name}","releases_url":"https://api.github.com/repos/geany/geany/releases{/id}","created_at":"2011-10-07T14:25:32Z","updated_at":"2015-02-22T17:03:09Z","pushed_at":"2015-02-21T18:21:38Z","git_url":"git://github.com/geany/geany.git","ssh_url":"git@github.com:geany/geany.git","clone_url":"https://github.com/geany/geany.git","svn_url":"https://github.com/geany/geany","homepage":"http://www.geany.org","size":44762,"stargazers_count":538,"watchers_count":538,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":212,"mirror_url":null,"open_issues_count":103,"forks":212,"open_issues":103,"watchers":538,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geany/geany/pulls/426"},"html":{"href":"https://github.com/geany/geany/pull/426"},"issue":{"href":"https://api.github.com/repos/geany/geany/issues/426"},"comments":{"href":"https://api.github.com/repos/geany/geany/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/geany/geany/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/geany/geany/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geany/geany/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/geany/geany/statuses/02d60c56229d83adeffc8343cc7ab6fdef5822b7"}}}}