{"action":"created","comment":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/comments/51453552","id":51453552,"diff_hunk":"@@ -82,11 +81,54 @@ bool OSystem_POSIX::hasFeature(Feature f) {\n Common::String OSystem_POSIX::getDefaultConfigFileName() {\n \tCommon::String configFile;\n \n-\t// On POSIX type systems, by default we store the config file inside\n-\t// to the HOME directory of the user.\n-\tconst char *home = getenv(\"HOME\");\n-\tif (home != NULL && (strlen(home) + 1 + _baseConfigName.size()) < MAXPATHLEN) {\n-\t\tconfigFile = Common::String::format(\"%s/%s\", home, _baseConfigName.c_str());\n+\tCommon::String prefix;\n+#ifdef MACOSX\n+\tprefix = getenv(\"HOME\");\n+#elif !defined(SAMSUNGTV)\n+\tconst char *envVar;\n+\t// Our old configuration file path for POSIX systems was ~/.scummvmrc.","path":"backends/platform/sdl/posix/posix.cpp","position":30,"original_position":30,"commit_id":"4edc015760636908c6b6afc29ae548ac4206899b","original_commit_id":"4edc015760636908c6b6afc29ae548ac4206899b","user":{"login":"criezy","id":552105,"avatar_url":"https://avatars.githubusercontent.com/u/552105?v=3","gravatar_id":"","url":"https://api.github.com/users/criezy","html_url":"https://github.com/criezy","followers_url":"https://api.github.com/users/criezy/followers","following_url":"https://api.github.com/users/criezy/following{/other_user}","gists_url":"https://api.github.com/users/criezy/gists{/gist_id}","starred_url":"https://api.github.com/users/criezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criezy/subscriptions","organizations_url":"https://api.github.com/users/criezy/orgs","repos_url":"https://api.github.com/users/criezy/repos","events_url":"https://api.github.com/users/criezy/events{/privacy}","received_events_url":"https://api.github.com/users/criezy/received_events","type":"User","site_admin":false},"body":"I would suggest waiting one version before adding autoupgrade so that the previous version also works with the new location when this happens. I am thinking about users who will find a regression when playing a game (that can happen!) and while waiting for 1.8.1 (or 1.9.0) release will switch back to the previous version to play that game. Of course that will not work for users witching to an older versions but hopefully would catch some (most?) of the cases of users downgrading. If we want to be ultra-conservative we can wait a bit more.","created_at":"2016-02-01T17:55:19Z","updated_at":"2016-02-01T17:55:19Z","html_url":"https://github.com/scummvm/scummvm/pull/656#discussion_r51453552","pull_request_url":"https://api.github.com/repos/scummvm/scummvm/pulls/656","_links":{"self":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/comments/51453552"},"html":{"href":"https://github.com/scummvm/scummvm/pull/656#discussion_r51453552"},"pull_request":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/656"}}},"pull_request":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/656","id":57693397,"html_url":"https://github.com/scummvm/scummvm/pull/656","diff_url":"https://github.com/scummvm/scummvm/pull/656.diff","patch_url":"https://github.com/scummvm/scummvm/pull/656.patch","issue_url":"https://api.github.com/repos/scummvm/scummvm/issues/656","number":656,"state":"open","locked":false,"title":"POSIX: Follow XDG Base Directory Specification for User's Files","user":{"login":"lordhoto","id":177695,"avatar_url":"https://avatars.githubusercontent.com/u/177695?v=3","gravatar_id":"","url":"https://api.github.com/users/lordhoto","html_url":"https://github.com/lordhoto","followers_url":"https://api.github.com/users/lordhoto/followers","following_url":"https://api.github.com/users/lordhoto/following{/other_user}","gists_url":"https://api.github.com/users/lordhoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lordhoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordhoto/subscriptions","organizations_url":"https://api.github.com/users/lordhoto/orgs","repos_url":"https://api.github.com/users/lordhoto/repos","events_url":"https://api.github.com/users/lordhoto/events{/privacy}","received_events_url":"https://api.github.com/users/lordhoto/received_events","type":"User","site_admin":false},"body":"This patch makes our POSIX ports use locations for configuration, log, and save games conforming to the XDG Base Directory Specification version 0.8 (right now the latest version, which can be found [here](http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html)).\r\n\r\nThe new locations are as follows:\r\n* Configuration file is now placed at `$XDG_CONFIG_HOME/scummvm/scummvm.ini`\r\n* New default savegame directory is at `$XDG_DATA_HOME/scummvm/saves/`\r\n* The log file is now placed at `$XDG_CACHE_HOME/scummvm/scummvm.log`\r\n\r\nWe still use the old locations for the configuration file and the savegame directory if those exist from a previous ScummVM installation.\r\n\r\nThis 'fixes' bug [#6036 POSIX: Use XDG dirs instead of HOME](https://sourceforge.net/p/scummvm/bugs/6036/). There is some discussion on the bug report about using a more easily visible location for save files. If we want that, we should do go for it now instead of having to worry about it again later.","created_at":"2016-01-29T19:45:09Z","updated_at":"2016-02-01T17:55:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44be92efc895a92603ce3868138a7b4f921c47de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scummvm/scummvm/pulls/656/commits","review_comments_url":"https://api.github.com/repos/scummvm/scummvm/pulls/656/comments","review_comment_url":"https://api.github.com/repos/scummvm/scummvm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scummvm/scummvm/issues/656/comments","statuses_url":"https://api.github.com/repos/scummvm/scummvm/statuses/4edc015760636908c6b6afc29ae548ac4206899b","head":{"label":"lordhoto:xdg-dirs-posix","ref":"xdg-dirs-posix","sha":"4edc015760636908c6b6afc29ae548ac4206899b","user":{"login":"lordhoto","id":177695,"avatar_url":"https://avatars.githubusercontent.com/u/177695?v=3","gravatar_id":"","url":"https://api.github.com/users/lordhoto","html_url":"https://github.com/lordhoto","followers_url":"https://api.github.com/users/lordhoto/followers","following_url":"https://api.github.com/users/lordhoto/following{/other_user}","gists_url":"https://api.github.com/users/lordhoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lordhoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordhoto/subscriptions","organizations_url":"https://api.github.com/users/lordhoto/orgs","repos_url":"https://api.github.com/users/lordhoto/repos","events_url":"https://api.github.com/users/lordhoto/events{/privacy}","received_events_url":"https://api.github.com/users/lordhoto/received_events","type":"User","site_admin":false},"repo":{"id":1361691,"name":"scummvm","full_name":"lordhoto/scummvm","owner":{"login":"lordhoto","id":177695,"avatar_url":"https://avatars.githubusercontent.com/u/177695?v=3","gravatar_id":"","url":"https://api.github.com/users/lordhoto","html_url":"https://github.com/lordhoto","followers_url":"https://api.github.com/users/lordhoto/followers","following_url":"https://api.github.com/users/lordhoto/following{/other_user}","gists_url":"https://api.github.com/users/lordhoto/gists{/gist_id}","starred_url":"https://api.github.com/users/lordhoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordhoto/subscriptions","organizations_url":"https://api.github.com/users/lordhoto/orgs","repos_url":"https://api.github.com/users/lordhoto/repos","events_url":"https://api.github.com/users/lordhoto/events{/privacy}","received_events_url":"https://api.github.com/users/lordhoto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lordhoto/scummvm","description":"ScummVM main repository","fork":true,"url":"https://api.github.com/repos/lordhoto/scummvm","forks_url":"https://api.github.com/repos/lordhoto/scummvm/forks","keys_url":"https://api.github.com/repos/lordhoto/scummvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lordhoto/scummvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lordhoto/scummvm/teams","hooks_url":"https://api.github.com/repos/lordhoto/scummvm/hooks","issue_events_url":"https://api.github.com/repos/lordhoto/scummvm/issues/events{/number}","events_url":"https://api.github.com/repos/lordhoto/scummvm/events","assignees_url":"https://api.github.com/repos/lordhoto/scummvm/assignees{/user}","branches_url":"https://api.github.com/repos/lordhoto/scummvm/branches{/branch}","tags_url":"https://api.github.com/repos/lordhoto/scummvm/tags","blobs_url":"https://api.github.com/repos/lordhoto/scummvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lordhoto/scummvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lordhoto/scummvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/lordhoto/scummvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lordhoto/scummvm/statuses/{sha}","languages_url":"https://api.github.com/repos/lordhoto/scummvm/languages","stargazers_url":"https://api.github.com/repos/lordhoto/scummvm/stargazers","contributors_url":"https://api.github.com/repos/lordhoto/scummvm/contributors","subscribers_url":"https://api.github.com/repos/lordhoto/scummvm/subscribers","subscription_url":"https://api.github.com/repos/lordhoto/scummvm/subscription","commits_url":"https://api.github.com/repos/lordhoto/scummvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/lordhoto/scummvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/lordhoto/scummvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/lordhoto/scummvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/lordhoto/scummvm/contents/{+path}","compare_url":"https://api.github.com/repos/lordhoto/scummvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lordhoto/scummvm/merges","archive_url":"https://api.github.com/repos/lordhoto/scummvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lordhoto/scummvm/downloads","issues_url":"https://api.github.com/repos/lordhoto/scummvm/issues{/number}","pulls_url":"https://api.github.com/repos/lordhoto/scummvm/pulls{/number}","milestones_url":"https://api.github.com/repos/lordhoto/scummvm/milestones{/number}","notifications_url":"https://api.github.com/repos/lordhoto/scummvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lordhoto/scummvm/labels{/name}","releases_url":"https://api.github.com/repos/lordhoto/scummvm/releases{/id}","deployments_url":"https://api.github.com/repos/lordhoto/scummvm/deployments","created_at":"2011-02-13T13:14:51Z","updated_at":"2015-03-05T19:15:33Z","pushed_at":"2016-01-29T22:31:08Z","git_url":"git://github.com/lordhoto/scummvm.git","ssh_url":"git@github.com:lordhoto/scummvm.git","clone_url":"https://github.com/lordhoto/scummvm.git","svn_url":"https://github.com/lordhoto/scummvm","homepage":"http://www.scummvm.org/","size":187834,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"scummvm:master","ref":"master","sha":"171b79c2c528d03a826ab095fcd3b0ebd3236f94","user":{"login":"scummvm","id":365181,"avatar_url":"https://avatars.githubusercontent.com/u/365181?v=3","gravatar_id":"","url":"https://api.github.com/users/scummvm","html_url":"https://github.com/scummvm","followers_url":"https://api.github.com/users/scummvm/followers","following_url":"https://api.github.com/users/scummvm/following{/other_user}","gists_url":"https://api.github.com/users/scummvm/gists{/gist_id}","starred_url":"https://api.github.com/users/scummvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scummvm/subscriptions","organizations_url":"https://api.github.com/users/scummvm/orgs","repos_url":"https://api.github.com/users/scummvm/repos","events_url":"https://api.github.com/users/scummvm/events{/privacy}","received_events_url":"https://api.github.com/users/scummvm/received_events","type":"Organization","site_admin":false},"repo":{"id":1358940,"name":"scummvm","full_name":"scummvm/scummvm","owner":{"login":"scummvm","id":365181,"avatar_url":"https://avatars.githubusercontent.com/u/365181?v=3","gravatar_id":"","url":"https://api.github.com/users/scummvm","html_url":"https://github.com/scummvm","followers_url":"https://api.github.com/users/scummvm/followers","following_url":"https://api.github.com/users/scummvm/following{/other_user}","gists_url":"https://api.github.com/users/scummvm/gists{/gist_id}","starred_url":"https://api.github.com/users/scummvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scummvm/subscriptions","organizations_url":"https://api.github.com/users/scummvm/orgs","repos_url":"https://api.github.com/users/scummvm/repos","events_url":"https://api.github.com/users/scummvm/events{/privacy}","received_events_url":"https://api.github.com/users/scummvm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scummvm/scummvm","description":"ScummVM main repository","fork":false,"url":"https://api.github.com/repos/scummvm/scummvm","forks_url":"https://api.github.com/repos/scummvm/scummvm/forks","keys_url":"https://api.github.com/repos/scummvm/scummvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scummvm/scummvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scummvm/scummvm/teams","hooks_url":"https://api.github.com/repos/scummvm/scummvm/hooks","issue_events_url":"https://api.github.com/repos/scummvm/scummvm/issues/events{/number}","events_url":"https://api.github.com/repos/scummvm/scummvm/events","assignees_url":"https://api.github.com/repos/scummvm/scummvm/assignees{/user}","branches_url":"https://api.github.com/repos/scummvm/scummvm/branches{/branch}","tags_url":"https://api.github.com/repos/scummvm/scummvm/tags","blobs_url":"https://api.github.com/repos/scummvm/scummvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scummvm/scummvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scummvm/scummvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/scummvm/scummvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scummvm/scummvm/statuses/{sha}","languages_url":"https://api.github.com/repos/scummvm/scummvm/languages","stargazers_url":"https://api.github.com/repos/scummvm/scummvm/stargazers","contributors_url":"https://api.github.com/repos/scummvm/scummvm/contributors","subscribers_url":"https://api.github.com/repos/scummvm/scummvm/subscribers","subscription_url":"https://api.github.com/repos/scummvm/scummvm/subscription","commits_url":"https://api.github.com/repos/scummvm/scummvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/scummvm/scummvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/scummvm/scummvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/scummvm/scummvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/scummvm/scummvm/contents/{+path}","compare_url":"https://api.github.com/repos/scummvm/scummvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scummvm/scummvm/merges","archive_url":"https://api.github.com/repos/scummvm/scummvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scummvm/scummvm/downloads","issues_url":"https://api.github.com/repos/scummvm/scummvm/issues{/number}","pulls_url":"https://api.github.com/repos/scummvm/scummvm/pulls{/number}","milestones_url":"https://api.github.com/repos/scummvm/scummvm/milestones{/number}","notifications_url":"https://api.github.com/repos/scummvm/scummvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scummvm/scummvm/labels{/name}","releases_url":"https://api.github.com/repos/scummvm/scummvm/releases{/id}","deployments_url":"https://api.github.com/repos/scummvm/scummvm/deployments","created_at":"2011-02-12T15:50:57Z","updated_at":"2016-01-29T23:38:51Z","pushed_at":"2016-02-01T15:34:33Z","git_url":"git://github.com/scummvm/scummvm.git","ssh_url":"git@github.com:scummvm/scummvm.git","clone_url":"https://github.com/scummvm/scummvm.git","svn_url":"https://github.com/scummvm/scummvm","homepage":"http://www.scummvm.org/","size":215833,"stargazers_count":567,"watchers_count":567,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":282,"mirror_url":null,"open_issues_count":22,"forks":282,"open_issues":22,"watchers":567,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/656"},"html":{"href":"https://github.com/scummvm/scummvm/pull/656"},"issue":{"href":"https://api.github.com/repos/scummvm/scummvm/issues/656"},"comments":{"href":"https://api.github.com/repos/scummvm/scummvm/issues/656/comments"},"review_comments":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/656/comments"},"review_comment":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/656/commits"},"statuses":{"href":"https://api.github.com/repos/scummvm/scummvm/statuses/4edc015760636908c6b6afc29ae548ac4206899b"}}}}