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

Create folder if config ends with (back)slash #1492

Merged
merged 7 commits into from
Jun 4, 2022

Conversation

jonakeys
Copy link
Contributor

(Accidentally closed the previous pull request #1482, so here it is again.)
This PR fixes the issue #1293 When reading the config file, the code now checks if the path ends with a (back)slash and if so, calls the FolderJournal instead of the PlainJournal.

I also added a BDD test for this specific check. There was already a check for a non-existent directory, but didn't check if the path ended with a (back)slash.

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number.
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed.

Copy link
Member

@micahellison micahellison left a comment

Choose a reason for hiding this comment

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

Thanks for these changes. Looks great!

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.

This is perfect! You even got the documentation updated! Thank you! 🥇

@micahellison micahellison added the bug Something isn't working label Jun 4, 2022
@micahellison micahellison changed the title Check for folder name ending with (back)slash and act on that Create folder if config ends with (back)slash Jun 4, 2022
@micahellison micahellison merged commit e758986 into jrnl-org:develop Jun 4, 2022
@jonakeys jonakeys deleted the 1293_folderNotExists branch June 7, 2022 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception when providing folder name of folder that does not exist as journal path
3 participants