{"action":"created","issue":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2212","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2212/labels{/name}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2212/comments","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2212/events","html_url":"https://github.com/dolphin-emu/dolphin/pull/2212","id":61815733,"number":2212,"title":"Fix user directories at times doing stupid things.","user":{"login":"Sonicadvance1","id":1018829,"avatar_url":"https://avatars.githubusercontent.com/u/1018829?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonicadvance1","html_url":"https://github.com/Sonicadvance1","followers_url":"https://api.github.com/users/Sonicadvance1/followers","following_url":"https://api.github.com/users/Sonicadvance1/following{/other_user}","gists_url":"https://api.github.com/users/Sonicadvance1/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonicadvance1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonicadvance1/subscriptions","organizations_url":"https://api.github.com/users/Sonicadvance1/orgs","repos_url":"https://api.github.com/users/Sonicadvance1/repos","events_url":"https://api.github.com/users/Sonicadvance1/events{/privacy}","received_events_url":"https://api.github.com/users/Sonicadvance1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-15T13:56:40Z","updated_at":"2015-03-16T03:45:52Z","closed_at":"2015-03-15T14:45:02Z","pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2212","html_url":"https://github.com/dolphin-emu/dolphin/pull/2212","diff_url":"https://github.com/dolphin-emu/dolphin/pull/2212.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/2212.patch"},"body":"With my previous changes Dolphin would fail to create the user directory if it didn't exist, and would dump all the configuration options in to the cwdir.\r\nThis was a bit more complicated to fix in a clean fashion, so I took to moving around code concerning user directories.\r\nInstead of having GetUserPath serve a dual purpose of both getting and setting our user directories, break out to a new SetUserPath function.\r\n\r\nGetUserPath will know only get the configured user path.\r\nSetUserPath will set our user paths and setup the internal user path state.\r\n\r\nThis ending up being a lot cleaner overall, which is nice. Also less mind bending when attempting to read the code.\r\n\r\nSo now we won't dump all of our configuration in to the cwdir if ~/.dolphin-emu isn't found.\r\n\r\nFixes issue 8371."},"comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments/81384400","html_url":"https://github.com/dolphin-emu/dolphin/pull/2212#issuecomment-81384400","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2212","id":81384400,"user":{"login":"magumagu","id":7026757,"avatar_url":"https://avatars.githubusercontent.com/u/7026757?v=3","gravatar_id":"","url":"https://api.github.com/users/magumagu","html_url":"https://github.com/magumagu","followers_url":"https://api.github.com/users/magumagu/followers","following_url":"https://api.github.com/users/magumagu/following{/other_user}","gists_url":"https://api.github.com/users/magumagu/gists{/gist_id}","starred_url":"https://api.github.com/users/magumagu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magumagu/subscriptions","organizations_url":"https://api.github.com/users/magumagu/orgs","repos_url":"https://api.github.com/users/magumagu/repos","events_url":"https://api.github.com/users/magumagu/events{/privacy}","received_events_url":"https://api.github.com/users/magumagu/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T03:45:52Z","updated_at":"2015-03-16T03:45:52Z","body":"Calling GetUserPath() before SetUserPath() shouldn't happen in practice; you could add an assertion to GetUserPath() if you're worried about it."}}