Initialize root_directory setting with absolute path#12
Merged
aburgm merged 1 commit intogobby:masterfrom Mar 22, 2016
hph86:rel-path-root
Merged
Initialize root_directory setting with absolute path#12aburgm merged 1 commit intogobby:masterfrom hph86:rel-path-root
aburgm merged 1 commit intogobby:masterfrom
hph86:rel-path-root
Conversation
Contributor
|
#14 should fix the travis-ci here as well |
Contributor
|
It seems dangerous to query the current directory every time a path is resolved, because the current directory could change during the lifetime of the program. I'd prefer to ensure that |
Contributor
Author
|
Good point I did not think of. Hopefully, I'll find time to rewrite the PR today. |
Contributor
Author
|
@aburgm: I have just updated the PR according to your suggestion. |
Contributor
|
travis-ci is unhappy, because it could not access the Ubuntu mirror, which is unrelated to this change. Can the check be re-started? |
Contributor
|
I restarted the job and it looks good. Will merge it tonight, hopefully. |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When starting infinoted twice like this
a warning is emitted and infinoted becomes unusable:
The ACL file
global-acl.xmlwhich is created during first invocation cannot be read during second invocation. The cause seems to be the functioninfd_filesystem_storage_storage_read_acl().First,
infd_filesystem_storage_get_acl_path() -> infd_filesystem_storage_get_path()is called and it should assure (according to the documentation) to always return an absolute path to said file. However, it only returns an absolute path if the "root-directory" setting was already absolute. Then,infd_filesystem_storage_read_xml_file_impl() -> g_filename_to_uri()is called which expects an absolute path and fails otherwise.The PR should ensure that
priv->root_directoryis always initialized with an absolute path. Thus, both relative and absolute settings of--root-directoryshould now be handled correctly.