-
Notifications
You must be signed in to change notification settings - Fork 424
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
Fix #38 #39
Fix #38 #39
Conversation
Previously, this would have created a '~' directory in the current dir. Now, this resolves homedirs first.
@@ -22,7 +22,7 @@ def create_app(path=None, gfm=False, context=None, username=None, password=None, | |||
raise ValueError('File not found: ' + path) | |||
|
|||
# Flask application | |||
app = Flask(__name__) | |||
app = Flask(__name__, instance_path=os.abspath(os.path.expanduser("~/.grip"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be os.path.abspath?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I'll fix the patch.
+1 |
I think #52 implements a better solution. |
@kynan Can you explain why you think that's a better solution? Is there any situation where you need to change the instance directory away from I'm going to merge this variation in until there's a compelling reason to add another configuration option. Every option makes the project just a little bit more complex. |
Thanks for the PR, @swsnider! |
Explicitly set the instance_path parameter to Flask so that when the app is installed, it doesn't try to write to a privileged directory.