{"action":"created","comment":{"url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/comments/75925080","id":75925080,"diff_hunk":"@@ -34,114 +35,85 @@ namespace librepcb {\n  ****************************************************************************************/\n \n DirectoryLock::DirectoryLock() noexcept :\n-    mFileToLock(), mLockFilepath(), mLockedByThisObject(false)\n+    mDirToLock(), mLockFilePath(), mLockedByThisObject(false)\n {\n     // nothing to do...\n }\n \n-DirectoryLock::DirectoryLock(const FilePath& filepath) noexcept :\n-    mFileToLock(), mLockFilepath(), mLockedByThisObject(false)\n+DirectoryLock::DirectoryLock(const FilePath& dir) noexcept :\n+    mDirToLock(), mLockFilePath(), mLockedByThisObject(false)\n {\n-    setFileToLock(filepath);\n+    setDirToLock(dir);\n }\n \n DirectoryLock::~DirectoryLock() noexcept\n {\n-    if (mLockedByThisObject)\n-        try{unlock();} catch (...) {}\n+    if (mLockedByThisObject) {\n+        try {\n+            unlock(); // can throw\n+        } catch (const Exception& e) {\n+            qCritical() << \"Could not remove lock file:\" << e.getUserMsg();\n+        }","path":"libs/librepcbcommon/fileio/directorylock.cpp","position":56,"original_position":36,"commit_id":"568e9cb0dce65a9d786367996a2c075d05414f52","original_commit_id":"35fc00d9b9d4e8cbec79f293c2291da91bf76e45","user":{"login":"ubruhin","id":5374821,"avatar_url":"https://avatars.githubusercontent.com/u/5374821?v=3","gravatar_id":"","url":"https://api.github.com/users/ubruhin","html_url":"https://github.com/ubruhin","followers_url":"https://api.github.com/users/ubruhin/followers","following_url":"https://api.github.com/users/ubruhin/following{/other_user}","gists_url":"https://api.github.com/users/ubruhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ubruhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubruhin/subscriptions","organizations_url":"https://api.github.com/users/ubruhin/orgs","repos_url":"https://api.github.com/users/ubruhin/repos","events_url":"https://api.github.com/users/ubruhin/events{/privacy}","received_events_url":"https://api.github.com/users/ubruhin/received_events","type":"User","site_admin":false},"body":"There aren't any other exceptions, all exceptions used in LibrePCB must be derived from `Exception`. If a 3rdparty library would throw other exceptions, we would need to wrap them.","created_at":"2016-08-23T18:32:53Z","updated_at":"2016-08-23T18:32:53Z","html_url":"https://github.com/LibrePCB/LibrePCB/pull/113#discussion_r75925080","pull_request_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/comments/75925080"},"html":{"href":"https://github.com/LibrePCB/LibrePCB/pull/113#discussion_r75925080"},"pull_request":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113","id":82108849,"html_url":"https://github.com/LibrePCB/LibrePCB/pull/113","diff_url":"https://github.com/LibrePCB/LibrePCB/pull/113.diff","patch_url":"https://github.com/LibrePCB/LibrePCB/pull/113.patch","issue_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/113","number":113,"state":"open","locked":false,"title":"Refactor/rename common class FileLock","user":{"login":"ubruhin","id":5374821,"avatar_url":"https://avatars.githubusercontent.com/u/5374821?v=3","gravatar_id":"","url":"https://api.github.com/users/ubruhin","html_url":"https://github.com/ubruhin","followers_url":"https://api.github.com/users/ubruhin/followers","following_url":"https://api.github.com/users/ubruhin/following{/other_user}","gists_url":"https://api.github.com/users/ubruhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ubruhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubruhin/subscriptions","organizations_url":"https://api.github.com/users/ubruhin/orgs","repos_url":"https://api.github.com/users/ubruhin/repos","events_url":"https://api.github.com/users/ubruhin/events{/privacy}","received_events_url":"https://api.github.com/users/ubruhin/received_events","type":"User","site_admin":false},"body":"- Rename class from FileLock to DirectoryLock\r\n- Lock whole directories instead of single files\r\n- Change lock file basename from \".~lock.FILENAME\" to \".lock\"\r\n- Change separator in lock files from comma (',') to newline ('\\n')\r\n- Make private constructors/operators public and use \"=delete\" instead\r\n- Use helper class \"FileUtils\" to read/write/remove lock files (removes redundant code)\r\n- Add unit tests","created_at":"2016-08-21T15:44:28Z","updated_at":"2016-08-23T18:32:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31837d2baa7398e641193c09f38fa0108a059fef","assignee":{"login":"ubruhin","id":5374821,"avatar_url":"https://avatars.githubusercontent.com/u/5374821?v=3","gravatar_id":"","url":"https://api.github.com/users/ubruhin","html_url":"https://github.com/ubruhin","followers_url":"https://api.github.com/users/ubruhin/followers","following_url":"https://api.github.com/users/ubruhin/following{/other_user}","gists_url":"https://api.github.com/users/ubruhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ubruhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubruhin/subscriptions","organizations_url":"https://api.github.com/users/ubruhin/orgs","repos_url":"https://api.github.com/users/ubruhin/repos","events_url":"https://api.github.com/users/ubruhin/events{/privacy}","received_events_url":"https://api.github.com/users/ubruhin/received_events","type":"User","site_admin":false},"assignees":[{"login":"ubruhin","id":5374821,"avatar_url":"https://avatars.githubusercontent.com/u/5374821?v=3","gravatar_id":"","url":"https://api.github.com/users/ubruhin","html_url":"https://github.com/ubruhin","followers_url":"https://api.github.com/users/ubruhin/followers","following_url":"https://api.github.com/users/ubruhin/following{/other_user}","gists_url":"https://api.github.com/users/ubruhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ubruhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubruhin/subscriptions","organizations_url":"https://api.github.com/users/ubruhin/orgs","repos_url":"https://api.github.com/users/ubruhin/repos","events_url":"https://api.github.com/users/ubruhin/events{/privacy}","received_events_url":"https://api.github.com/users/ubruhin/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/LibrePCB/LibrePCB/milestones/1","html_url":"https://github.com/LibrePCB/LibrePCB/milestones/0.1","labels_url":"https://api.github.com/repos/LibrePCB/LibrePCB/milestones/1/labels","id":1218786,"number":1,"title":"0.1","description":"First official release of LibrePCB.\r\n\r\nIncluded:\r\n- library elements: component categories, package categories, symbols, footprints, packages, components, devices\r\n- schematic editor with basic functionality\r\n- board editor with basic functionality (incl. gerber export)\r\n- library editor with basic functionality\r\n\r\nNot included:\r\n- library elements: 3D models, SPICE models\r\n- SPICE simulations\r\n- 3D view of boards\r\n- 3D file export of boards","creator":{"login":"ubruhin","id":5374821,"avatar_url":"https://avatars.githubusercontent.com/u/5374821?v=3","gravatar_id":"","url":"https://api.github.com/users/ubruhin","html_url":"https://github.com/ubruhin","followers_url":"https://api.github.com/users/ubruhin/followers","following_url":"https://api.github.com/users/ubruhin/following{/other_user}","gists_url":"https://api.github.com/users/ubruhin/gists{/gist_id}","starred_url":"https://api.github.com/users/ubruhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubruhin/subscriptions","organizations_url":"https://api.github.com/users/ubruhin/orgs","repos_url":"https://api.github.com/users/ubruhin/repos","events_url":"https://api.github.com/users/ubruhin/events{/privacy}","received_events_url":"https://api.github.com/users/ubruhin/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":14,"state":"open","created_at":"2015-07-21T18:50:21Z","updated_at":"2016-08-22T21:08:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113/commits","review_comments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113/comments","review_comment_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/113/comments","statuses_url":"https://api.github.com/repos/LibrePCB/LibrePCB/statuses/568e9cb0dce65a9d786367996a2c075d05414f52","head":{"label":"LibrePCB:refactor_class_filelock","ref":"refactor_class_filelock","sha":"568e9cb0dce65a9d786367996a2c075d05414f52","user":{"login":"LibrePCB","id":12969908,"avatar_url":"https://avatars.githubusercontent.com/u/12969908?v=3","gravatar_id":"","url":"https://api.github.com/users/LibrePCB","html_url":"https://github.com/LibrePCB","followers_url":"https://api.github.com/users/LibrePCB/followers","following_url":"https://api.github.com/users/LibrePCB/following{/other_user}","gists_url":"https://api.github.com/users/LibrePCB/gists{/gist_id}","starred_url":"https://api.github.com/users/LibrePCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LibrePCB/subscriptions","organizations_url":"https://api.github.com/users/LibrePCB/orgs","repos_url":"https://api.github.com/users/LibrePCB/repos","events_url":"https://api.github.com/users/LibrePCB/events{/privacy}","received_events_url":"https://api.github.com/users/LibrePCB/received_events","type":"Organization","site_admin":false},"repo":{"id":37735755,"name":"LibrePCB","full_name":"LibrePCB/LibrePCB","owner":{"login":"LibrePCB","id":12969908,"avatar_url":"https://avatars.githubusercontent.com/u/12969908?v=3","gravatar_id":"","url":"https://api.github.com/users/LibrePCB","html_url":"https://github.com/LibrePCB","followers_url":"https://api.github.com/users/LibrePCB/followers","following_url":"https://api.github.com/users/LibrePCB/following{/other_user}","gists_url":"https://api.github.com/users/LibrePCB/gists{/gist_id}","starred_url":"https://api.github.com/users/LibrePCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LibrePCB/subscriptions","organizations_url":"https://api.github.com/users/LibrePCB/orgs","repos_url":"https://api.github.com/users/LibrePCB/repos","events_url":"https://api.github.com/users/LibrePCB/events{/privacy}","received_events_url":"https://api.github.com/users/LibrePCB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LibrePCB/LibrePCB","description":"A free Schematic & PCB Editor","fork":false,"url":"https://api.github.com/repos/LibrePCB/LibrePCB","forks_url":"https://api.github.com/repos/LibrePCB/LibrePCB/forks","keys_url":"https://api.github.com/repos/LibrePCB/LibrePCB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LibrePCB/LibrePCB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LibrePCB/LibrePCB/teams","hooks_url":"https://api.github.com/repos/LibrePCB/LibrePCB/hooks","issue_events_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/events{/number}","events_url":"https://api.github.com/repos/LibrePCB/LibrePCB/events","assignees_url":"https://api.github.com/repos/LibrePCB/LibrePCB/assignees{/user}","branches_url":"https://api.github.com/repos/LibrePCB/LibrePCB/branches{/branch}","tags_url":"https://api.github.com/repos/LibrePCB/LibrePCB/tags","blobs_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/refs{/sha}","trees_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LibrePCB/LibrePCB/statuses/{sha}","languages_url":"https://api.github.com/repos/LibrePCB/LibrePCB/languages","stargazers_url":"https://api.github.com/repos/LibrePCB/LibrePCB/stargazers","contributors_url":"https://api.github.com/repos/LibrePCB/LibrePCB/contributors","subscribers_url":"https://api.github.com/repos/LibrePCB/LibrePCB/subscribers","subscription_url":"https://api.github.com/repos/LibrePCB/LibrePCB/subscription","commits_url":"https://api.github.com/repos/LibrePCB/LibrePCB/commits{/sha}","git_commits_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/commits{/sha}","comments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/comments{/number}","issue_comment_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/comments{/number}","contents_url":"https://api.github.com/repos/LibrePCB/LibrePCB/contents/{+path}","compare_url":"https://api.github.com/repos/LibrePCB/LibrePCB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LibrePCB/LibrePCB/merges","archive_url":"https://api.github.com/repos/LibrePCB/LibrePCB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LibrePCB/LibrePCB/downloads","issues_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues{/number}","pulls_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls{/number}","milestones_url":"https://api.github.com/repos/LibrePCB/LibrePCB/milestones{/number}","notifications_url":"https://api.github.com/repos/LibrePCB/LibrePCB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LibrePCB/LibrePCB/labels{/name}","releases_url":"https://api.github.com/repos/LibrePCB/LibrePCB/releases{/id}","deployments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/deployments","created_at":"2015-06-19T17:21:08Z","updated_at":"2016-08-05T12:59:14Z","pushed_at":"2016-08-22T22:37:19Z","git_url":"git://github.com/LibrePCB/LibrePCB.git","ssh_url":"git@github.com:LibrePCB/LibrePCB.git","clone_url":"https://github.com/LibrePCB/LibrePCB.git","svn_url":"https://github.com/LibrePCB/LibrePCB","homepage":"http://librepcb.org","size":35367,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":39,"forks":8,"open_issues":39,"watchers":12,"default_branch":"master"}},"base":{"label":"LibrePCB:master","ref":"master","sha":"2732d1a4149f4a403915c58594edfd6624a80c41","user":{"login":"LibrePCB","id":12969908,"avatar_url":"https://avatars.githubusercontent.com/u/12969908?v=3","gravatar_id":"","url":"https://api.github.com/users/LibrePCB","html_url":"https://github.com/LibrePCB","followers_url":"https://api.github.com/users/LibrePCB/followers","following_url":"https://api.github.com/users/LibrePCB/following{/other_user}","gists_url":"https://api.github.com/users/LibrePCB/gists{/gist_id}","starred_url":"https://api.github.com/users/LibrePCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LibrePCB/subscriptions","organizations_url":"https://api.github.com/users/LibrePCB/orgs","repos_url":"https://api.github.com/users/LibrePCB/repos","events_url":"https://api.github.com/users/LibrePCB/events{/privacy}","received_events_url":"https://api.github.com/users/LibrePCB/received_events","type":"Organization","site_admin":false},"repo":{"id":37735755,"name":"LibrePCB","full_name":"LibrePCB/LibrePCB","owner":{"login":"LibrePCB","id":12969908,"avatar_url":"https://avatars.githubusercontent.com/u/12969908?v=3","gravatar_id":"","url":"https://api.github.com/users/LibrePCB","html_url":"https://github.com/LibrePCB","followers_url":"https://api.github.com/users/LibrePCB/followers","following_url":"https://api.github.com/users/LibrePCB/following{/other_user}","gists_url":"https://api.github.com/users/LibrePCB/gists{/gist_id}","starred_url":"https://api.github.com/users/LibrePCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LibrePCB/subscriptions","organizations_url":"https://api.github.com/users/LibrePCB/orgs","repos_url":"https://api.github.com/users/LibrePCB/repos","events_url":"https://api.github.com/users/LibrePCB/events{/privacy}","received_events_url":"https://api.github.com/users/LibrePCB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LibrePCB/LibrePCB","description":"A free Schematic & PCB Editor","fork":false,"url":"https://api.github.com/repos/LibrePCB/LibrePCB","forks_url":"https://api.github.com/repos/LibrePCB/LibrePCB/forks","keys_url":"https://api.github.com/repos/LibrePCB/LibrePCB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LibrePCB/LibrePCB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LibrePCB/LibrePCB/teams","hooks_url":"https://api.github.com/repos/LibrePCB/LibrePCB/hooks","issue_events_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/events{/number}","events_url":"https://api.github.com/repos/LibrePCB/LibrePCB/events","assignees_url":"https://api.github.com/repos/LibrePCB/LibrePCB/assignees{/user}","branches_url":"https://api.github.com/repos/LibrePCB/LibrePCB/branches{/branch}","tags_url":"https://api.github.com/repos/LibrePCB/LibrePCB/tags","blobs_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/refs{/sha}","trees_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LibrePCB/LibrePCB/statuses/{sha}","languages_url":"https://api.github.com/repos/LibrePCB/LibrePCB/languages","stargazers_url":"https://api.github.com/repos/LibrePCB/LibrePCB/stargazers","contributors_url":"https://api.github.com/repos/LibrePCB/LibrePCB/contributors","subscribers_url":"https://api.github.com/repos/LibrePCB/LibrePCB/subscribers","subscription_url":"https://api.github.com/repos/LibrePCB/LibrePCB/subscription","commits_url":"https://api.github.com/repos/LibrePCB/LibrePCB/commits{/sha}","git_commits_url":"https://api.github.com/repos/LibrePCB/LibrePCB/git/commits{/sha}","comments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/comments{/number}","issue_comment_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/comments{/number}","contents_url":"https://api.github.com/repos/LibrePCB/LibrePCB/contents/{+path}","compare_url":"https://api.github.com/repos/LibrePCB/LibrePCB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LibrePCB/LibrePCB/merges","archive_url":"https://api.github.com/repos/LibrePCB/LibrePCB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LibrePCB/LibrePCB/downloads","issues_url":"https://api.github.com/repos/LibrePCB/LibrePCB/issues{/number}","pulls_url":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls{/number}","milestones_url":"https://api.github.com/repos/LibrePCB/LibrePCB/milestones{/number}","notifications_url":"https://api.github.com/repos/LibrePCB/LibrePCB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LibrePCB/LibrePCB/labels{/name}","releases_url":"https://api.github.com/repos/LibrePCB/LibrePCB/releases{/id}","deployments_url":"https://api.github.com/repos/LibrePCB/LibrePCB/deployments","created_at":"2015-06-19T17:21:08Z","updated_at":"2016-08-05T12:59:14Z","pushed_at":"2016-08-22T22:37:19Z","git_url":"git://github.com/LibrePCB/LibrePCB.git","ssh_url":"git@github.com:LibrePCB/LibrePCB.git","clone_url":"https://github.com/LibrePCB/LibrePCB.git","svn_url":"https://github.com/LibrePCB/LibrePCB","homepage":"http://librepcb.org","size":35367,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":39,"forks":8,"open_issues":39,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113"},"html":{"href":"https://github.com/LibrePCB/LibrePCB/pull/113"},"issue":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/113"},"comments":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/LibrePCB/LibrePCB/statuses/568e9cb0dce65a9d786367996a2c075d05414f52"}}}}
{"actor":{"display_login":"ubruhin"}}