{"action":"created","issue":{"url":"https://api.github.com/repos/tux3/qTox/issues/2014","labels_url":"https://api.github.com/repos/tux3/qTox/issues/2014/labels{/name}","comments_url":"https://api.github.com/repos/tux3/qTox/issues/2014/comments","events_url":"https://api.github.com/repos/tux3/qTox/issues/2014/events","html_url":"https://github.com/tux3/qTox/pull/2014","id":95685280,"number":2014,"title":"Remove call to ProfileLocker::clearAllLocks()","user":{"login":"Spagy","id":5479401,"avatar_url":"https://avatars.githubusercontent.com/u/5479401?v=3","gravatar_id":"","url":"https://api.github.com/users/Spagy","html_url":"https://github.com/Spagy","followers_url":"https://api.github.com/users/Spagy/followers","following_url":"https://api.github.com/users/Spagy/following{/other_user}","gists_url":"https://api.github.com/users/Spagy/gists{/gist_id}","starred_url":"https://api.github.com/users/Spagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spagy/subscriptions","organizations_url":"https://api.github.com/users/Spagy/orgs","repos_url":"https://api.github.com/users/Spagy/repos","events_url":"https://api.github.com/users/Spagy/events{/privacy}","received_events_url":"https://api.github.com/users/Spagy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-17T15:51:16Z","updated_at":"2015-09-03T15:19:36Z","closed_at":"2015-09-03T15:19:25Z","pull_request":{"url":"https://api.github.com/repos/tux3/qTox/pulls/2014","html_url":"https://github.com/tux3/qTox/pull/2014","diff_url":"https://github.com/tux3/qTox/pull/2014.diff","patch_url":"https://github.com/tux3/qTox/pull/2014.patch"},"body":"Before: `ProfileLocker::clearAllLocks()` deleted all .lock files in `/home/user/.config/tox/` or whatever the alternative is on other platforms. This means the hypothetical file `/home/user/.config/tox/gTox.conf.lock` would be deleted whenever qTox starts.\r\n\r\nNow:\r\n* Stale files, caused by a program crashing should be (and are*) deleted. [Docs](http://doc.qt.io/qt-5/qlockfile.html).\r\n* Other programs can use .lock files with out having them deleted by qTox.\r\n* If another client creates a .lock file on a profile then the user tries to open that profile in qTox as well then qTox will inform them that the profile is already in use.\r\n\r\nThis should allow locks to work between clients so long as they use the same naming convention. Perhaps this could be added to the STS in the future.\r\n\r\n*I have tested this and stale files are deleted so long as they take the right form. If the file is empty or the file contains something other than a number on the first line it will never be seen as stale.\r\n\r\nThis could cause a problem if another client creates a lock file in the wrong form and then crashes.\r\nFor reference the right form is PID on the first line, process name on the second and, optionally, hostname on the third line.\r\nE.g.\r\n```\r\n28115\r\nqTox\r\nmyCompter\r\n```\r\nor\r\n```\r\n14325\r\ngTox\r\n```\r\n\r\n`ProfileLocker::clearAllLocks()` still exists it just isn't called anywhere."},"comment":{"url":"https://api.github.com/repos/tux3/qTox/issues/comments/137483368","html_url":"https://github.com/tux3/qTox/pull/2014#issuecomment-137483368","issue_url":"https://api.github.com/repos/tux3/qTox/issues/2014","id":137483368,"user":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T15:19:36Z","updated_at":"2015-09-03T15:19:36Z","body":"Yep :)"}}