{"action":"created","comment":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/comments/89176775","pull_request_review_id":9725197,"id":89176775,"diff_hunk":"@@ -335,13 +337,26 @@ private void AssertIsAlreadyInitialized()\n \t\tpublic string SaveHtml(HtmlDom dom)\n \t\t{\n \t\t\tAssertIsAlreadyInitialized();\n-\t\t\tstring tempPath = Path.GetTempFileName();\n+\t\t\tstring tempPath = GetTempHtmlFileName();\n \t\t\tMakeCssLinksAppropriateForStoredFile(dom);\n \t\t\tSetBaseForRelativePaths(dom, string.Empty);// remove any dependency on this computer, and where files are on it.\n \t\t\t//CopyXMatterStylesheetsIntoFolder\n \t\t\treturn XmlHtmlConverter.SaveDOMAsHtml5(dom.RawDom, tempPath);\n \t\t}\n \n+\t\t/// <summary>\n+\t\t/// Get a temporary file pathname in the current book's folder.  This is needed to ensure proper permissions are granted\n+\t\t/// to the resulting file later after FileUtils.ReplaceFileWithUserInteractionIfNeeded is called.  That method may call\n+\t\t/// File.Replace which replaces both the file content and the file metadata (permissions).  The result of that if we use\n+\t\t/// the user's temp directory is described in http://issues.bloomlibrary.org/youtrack/issue/BL-3954.\n+\t\t/// </summary>\n+\t\tprivate string GetTempHtmlFileName()","path":"src/BloomExe/Book/BookStorage.cs","position":27,"original_position":27,"commit_id":"3c202c9d2e8e6f1801370dd3177f10ae966608ba","original_commit_id":"3c202c9d2e8e6f1801370dd3177f10ae966608ba","user":{"login":"hatton","id":8448,"avatar_url":"https://avatars.githubusercontent.com/u/8448?v=3","gravatar_id":"","url":"https://api.github.com/users/hatton","html_url":"https://github.com/hatton","followers_url":"https://api.github.com/users/hatton/followers","following_url":"https://api.github.com/users/hatton/following{/other_user}","gists_url":"https://api.github.com/users/hatton/gists{/gist_id}","starred_url":"https://api.github.com/users/hatton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatton/subscriptions","organizations_url":"https://api.github.com/users/hatton/orgs","repos_url":"https://api.github.com/users/hatton/repos","events_url":"https://api.github.com/users/hatton/events{/privacy}","received_events_url":"https://api.github.com/users/hatton/received_events","type":"User","site_admin":false},"body":"How about GetNameForATempFileInStorageFolder()  . There's no .html to this.","created_at":"2016-11-22T18:13:22Z","updated_at":"2016-11-22T18:13:22Z","html_url":"https://github.com/BloomBooks/BloomDesktop/pull/1327#discussion_r89176775","pull_request_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327","_links":{"self":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/comments/89176775"},"html":{"href":"https://github.com/BloomBooks/BloomDesktop/pull/1327#discussion_r89176775"},"pull_request":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327"}}},"pull_request":{"url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327","id":94453201,"html_url":"https://github.com/BloomBooks/BloomDesktop/pull/1327","diff_url":"https://github.com/BloomBooks/BloomDesktop/pull/1327.diff","patch_url":"https://github.com/BloomBooks/BloomDesktop/pull/1327.patch","issue_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/1327","number":1327,"state":"open","locked":false,"title":"Create temporary files in book folder if needed (BL-3954)","user":{"login":"StephenMcConnel","id":2228246,"avatar_url":"https://avatars.githubusercontent.com/u/2228246?v=3","gravatar_id":"","url":"https://api.github.com/users/StephenMcConnel","html_url":"https://github.com/StephenMcConnel","followers_url":"https://api.github.com/users/StephenMcConnel/followers","following_url":"https://api.github.com/users/StephenMcConnel/following{/other_user}","gists_url":"https://api.github.com/users/StephenMcConnel/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenMcConnel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenMcConnel/subscriptions","organizations_url":"https://api.github.com/users/StephenMcConnel/orgs","repos_url":"https://api.github.com/users/StephenMcConnel/repos","events_url":"https://api.github.com/users/StephenMcConnel/events{/privacy}","received_events_url":"https://api.github.com/users/StephenMcConnel/received_events","type":"User","site_admin":false},"body":"This preserves the proper permissions for access over a network\r\nfile share.\r\n\r\nThis is an alternative to https://github.com/BloomBooks/BloomDesktop/pull/1322.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/bloombooks/bloomdesktop/1327)\n<!-- Reviewable:end -->\n","created_at":"2016-11-18T23:08:53Z","updated_at":"2016-11-22T18:13:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e9991bad95cec1a78afa286d8f6f6064dd9437a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327/commits","review_comments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327/comments","review_comment_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/1327/comments","statuses_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/statuses/3c202c9d2e8e6f1801370dd3177f10ae966608ba","head":{"label":"StephenMcConnel:BL-3954-UseLocalTempFiles","ref":"BL-3954-UseLocalTempFiles","sha":"3c202c9d2e8e6f1801370dd3177f10ae966608ba","user":{"login":"StephenMcConnel","id":2228246,"avatar_url":"https://avatars.githubusercontent.com/u/2228246?v=3","gravatar_id":"","url":"https://api.github.com/users/StephenMcConnel","html_url":"https://github.com/StephenMcConnel","followers_url":"https://api.github.com/users/StephenMcConnel/followers","following_url":"https://api.github.com/users/StephenMcConnel/following{/other_user}","gists_url":"https://api.github.com/users/StephenMcConnel/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenMcConnel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenMcConnel/subscriptions","organizations_url":"https://api.github.com/users/StephenMcConnel/orgs","repos_url":"https://api.github.com/users/StephenMcConnel/repos","events_url":"https://api.github.com/users/StephenMcConnel/events{/privacy}","received_events_url":"https://api.github.com/users/StephenMcConnel/received_events","type":"User","site_admin":false},"repo":{"id":27390005,"name":"BloomDesktop","full_name":"StephenMcConnel/BloomDesktop","owner":{"login":"StephenMcConnel","id":2228246,"avatar_url":"https://avatars.githubusercontent.com/u/2228246?v=3","gravatar_id":"","url":"https://api.github.com/users/StephenMcConnel","html_url":"https://github.com/StephenMcConnel","followers_url":"https://api.github.com/users/StephenMcConnel/followers","following_url":"https://api.github.com/users/StephenMcConnel/following{/other_user}","gists_url":"https://api.github.com/users/StephenMcConnel/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenMcConnel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenMcConnel/subscriptions","organizations_url":"https://api.github.com/users/StephenMcConnel/orgs","repos_url":"https://api.github.com/users/StephenMcConnel/repos","events_url":"https://api.github.com/users/StephenMcConnel/events{/privacy}","received_events_url":"https://api.github.com/users/StephenMcConnel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StephenMcConnel/BloomDesktop","description":"Bloom Desktop is a hybrid c#/javascript/html/css Windows application that dramatically \"lowers the bar\" for language communities who want books in their own languages. Bloom delivers a low-training, high-output system where mother tongue speakers and their advocates work together to foster both community authorship and access to external material in the vernacular.","fork":true,"url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop","forks_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/forks","keys_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/teams","hooks_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/hooks","issue_events_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/issues/events{/number}","events_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/events","assignees_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/assignees{/user}","branches_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/branches{/branch}","tags_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/tags","blobs_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/statuses/{sha}","languages_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/languages","stargazers_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/stargazers","contributors_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/contributors","subscribers_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/subscribers","subscription_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/subscription","commits_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/contents/{+path}","compare_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/merges","archive_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/downloads","issues_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/issues{/number}","pulls_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/pulls{/number}","milestones_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/milestones{/number}","notifications_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/labels{/name}","releases_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/releases{/id}","deployments_url":"https://api.github.com/repos/StephenMcConnel/BloomDesktop/deployments","created_at":"2014-12-01T17:08:52Z","updated_at":"2016-01-15T16:22:57Z","pushed_at":"2016-11-22T17:56:27Z","git_url":"git://github.com/StephenMcConnel/BloomDesktop.git","ssh_url":"git@github.com:StephenMcConnel/BloomDesktop.git","clone_url":"https://github.com/StephenMcConnel/BloomDesktop.git","svn_url":"https://github.com/StephenMcConnel/BloomDesktop","homepage":"http://bloomlibrary.org/","size":88386,"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":"BloomBooks:master","ref":"master","sha":"9e930ba85ef64ad1857f1027df9a26d12f0556d7","user":{"login":"BloomBooks","id":5853716,"avatar_url":"https://avatars.githubusercontent.com/u/5853716?v=3","gravatar_id":"","url":"https://api.github.com/users/BloomBooks","html_url":"https://github.com/BloomBooks","followers_url":"https://api.github.com/users/BloomBooks/followers","following_url":"https://api.github.com/users/BloomBooks/following{/other_user}","gists_url":"https://api.github.com/users/BloomBooks/gists{/gist_id}","starred_url":"https://api.github.com/users/BloomBooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloomBooks/subscriptions","organizations_url":"https://api.github.com/users/BloomBooks/orgs","repos_url":"https://api.github.com/users/BloomBooks/repos","events_url":"https://api.github.com/users/BloomBooks/events{/privacy}","received_events_url":"https://api.github.com/users/BloomBooks/received_events","type":"Organization","site_admin":false},"repo":{"id":14133680,"name":"BloomDesktop","full_name":"BloomBooks/BloomDesktop","owner":{"login":"BloomBooks","id":5853716,"avatar_url":"https://avatars.githubusercontent.com/u/5853716?v=3","gravatar_id":"","url":"https://api.github.com/users/BloomBooks","html_url":"https://github.com/BloomBooks","followers_url":"https://api.github.com/users/BloomBooks/followers","following_url":"https://api.github.com/users/BloomBooks/following{/other_user}","gists_url":"https://api.github.com/users/BloomBooks/gists{/gist_id}","starred_url":"https://api.github.com/users/BloomBooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloomBooks/subscriptions","organizations_url":"https://api.github.com/users/BloomBooks/orgs","repos_url":"https://api.github.com/users/BloomBooks/repos","events_url":"https://api.github.com/users/BloomBooks/events{/privacy}","received_events_url":"https://api.github.com/users/BloomBooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BloomBooks/BloomDesktop","description":"Let's Grow a Library","fork":false,"url":"https://api.github.com/repos/BloomBooks/BloomDesktop","forks_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/forks","keys_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/teams","hooks_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/hooks","issue_events_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/events{/number}","events_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/events","assignees_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/assignees{/user}","branches_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/branches{/branch}","tags_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/tags","blobs_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/statuses/{sha}","languages_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/languages","stargazers_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/stargazers","contributors_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/contributors","subscribers_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/subscribers","subscription_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/subscription","commits_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/contents/{+path}","compare_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/merges","archive_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/downloads","issues_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues{/number}","pulls_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls{/number}","milestones_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/milestones{/number}","notifications_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/labels{/name}","releases_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/releases{/id}","deployments_url":"https://api.github.com/repos/BloomBooks/BloomDesktop/deployments","created_at":"2013-11-05T06:12:57Z","updated_at":"2016-10-24T22:15:24Z","pushed_at":"2016-11-22T17:56:33Z","git_url":"git://github.com/BloomBooks/BloomDesktop.git","ssh_url":"git@github.com:BloomBooks/BloomDesktop.git","clone_url":"https://github.com/BloomBooks/BloomDesktop.git","svn_url":"https://github.com/BloomBooks/BloomDesktop","homepage":"http://bloomlibrary.org/","size":95893,"stargazers_count":11,"watchers_count":11,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":6,"forks":12,"open_issues":6,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327"},"html":{"href":"https://github.com/BloomBooks/BloomDesktop/pull/1327"},"issue":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/1327"},"comments":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/issues/1327/comments"},"review_comments":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327/comments"},"review_comment":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/pulls/1327/commits"},"statuses":{"href":"https://api.github.com/repos/BloomBooks/BloomDesktop/statuses/3c202c9d2e8e6f1801370dd3177f10ae966608ba"}}}}
{"actor":{"display_login":"hatton"}}