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

Make sure the path to the bookmarks file exists before writing it. #871

Merged
merged 2 commits into from
Sep 10, 2018

Conversation

PhilRunninger
Copy link
Member

Fixes #435.

Copy link
Contributor

@lifecrisis lifecrisis left a comment

Choose a reason for hiding this comment

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

Hmmm...

I think we're being a little too helpful here. I would argue that making sure the path to the file exists and that the location is reachable (in terms of permissions) is the responsibility of the user. I would just let him know and close the issue.

Let me know what you think.

This change puts the burden on the user to make sure
g:NERDTreeBookmarksFile is correctly set and the path it contains is
present and has the proper permissions. If this is not the case, an
error message is displayed. This is a better solution than to blindly
create the path, when it may actually be impossible to do so.
@PhilRunninger
Copy link
Member Author

@lifecrisis, I agree with your argument, but instead of letting the code crash the way it does now, I opted for a cleaner error message, as seen in my latest commit.

Copy link
Contributor

@lifecrisis lifecrisis left a comment

Choose a reason for hiding this comment

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

Looks fantastic! Exactly what I had envisioned.

@PhilRunninger PhilRunninger merged commit b3804dc into master Sep 10, 2018
@PhilRunninger PhilRunninger deleted the trap_bad_bookmark_path branch September 10, 2018 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants