Skip to content

EknVfs: g_file_parse_name("~") does not work - #12

Open
dylanmccall wants to merge 2 commits into
masterfrom
dylanmccall/T23125
Open

EknVfs: g_file_parse_name("~") does not work#12
dylanmccall wants to merge 2 commits into
masterfrom
dylanmccall/T23125

Conversation

@dylanmccall

Copy link
Copy Markdown
Contributor

Previously, ekn_vfs_get_file_for_uri was testing whether elements in a
tokens array were null, without testing the size of the array. This
change adds one additional call to g_strsplit. The first is to separate
the URI scheme from the path, and the second is to separate tokens in
the path. Tokens are then assigned to variables for readability.

https://phabricator.endlessm.com/T23125
Comment thread eknvfs/ekn-vfs.c Outdated
@dylanmccall
dylanmccall force-pushed the dylanmccall/T23125 branch 2 times, most recently from 19567a6 to 8eb1b3c Compare September 12, 2019 00:02
@dylanmccall
dylanmccall marked this pull request as ready for review September 12, 2019 00:06
@ptomato

ptomato commented Sep 12, 2019

Copy link
Copy Markdown
Contributor

@xjuan might be a good reviewer for this code!

@dylanmccall
dylanmccall requested a review from xjuan September 12, 2019 17:09
Comment thread eknvfs/ekn-vfs.c Outdated
Comment thread eknvfs/ekn-vfs.c Outdated
Comment thread eknvfs/ekn-vfs.c Outdated
With this change, ekn_vfs_parse_name uses the same behaviour as
ekn_vfs_get_file_for_uri to decide whether a URI scheme is supported. If
it is not, the implementation of parse_name from GLocalVfs is used
instead. This behaviour is consistent with the existing behaviour, since
ekn_vfs_get_file_for_uri also falls back to the implementation of
get_file_for_uri from GLocalVfs when the scheme is not supported.

This is necessary because parse_name and get_file_for_uri behave
differently in GLocalVfs for certain paths.

https://phabricator.endlessm.com/T23125
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.

3 participants