Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close temp file before passing it to editor to prevent file locking issues in Windows #792

Merged
merged 1 commit into from Jan 17, 2020
Merged

Close temp file before passing it to editor to prevent file locking issues in Windows #792

merged 1 commit into from Jan 17, 2020

Conversation

micahellison
Copy link
Member

@micahellison micahellison commented Jan 10, 2020

When jrnl creates a temp file to pass to the user's custom editor, it doesn't close that temp file first. This doesn't seem to be an issue on *nix, but in Windows, this makes editing impossible because the editor can't get a write lock on the file.

Checklist

  • The code change is tested and works locally.
  • Tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable? - no! I can't think of how to write any for this. Suggestions welcome.

Fixes #790

@micahellison micahellison changed the title #790 - closing temp file before passing it to editor to prevent file locking issues in Windows #790 - Close temp file before passing it to editor to prevent file locking issues in Windows Jan 10, 2020
@micahellison micahellison changed the title #790 - Close temp file before passing it to editor to prevent file locking issues in Windows Close temp file before passing it to editor to prevent file locking issues in Windows Jan 15, 2020
Copy link
Member

@wren wren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@wren wren added the bug Something isn't working label Jan 17, 2020
@wren wren merged commit 8ed1ca8 into jrnl-org:develop Jan 17, 2020
@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the 🔒 Outdated label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 🔒 Outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File locking error when editing in windows
2 participants