Skip to content

Conversation

chaudharydeepanshu
Copy link
Contributor

If the file path passed is an absolute file path and if its name contains colon : then the URI parsed will be wrong as the scheme parsed will be not unusable.

More detail:-
Example path with issue: /data/user/0/com.example.appname/cache/2022-11-05 20:53:17.783069.png.
Now, for the example the parsedScheme in getURI will be /data/user/0/com.example.appname/cache/2022-11-05 20 as a scheme is anything before colon. Due to this getURI will return us the same string passed which will be unusable further down the code.

So, what we do is check if the string passed to getURI starts with / or not, if it starts with / then most probably it is an absolute file path.

Let me know if you have any questions about this change.

@chaudharydeepanshu
Copy link
Contributor Author

Any update on this guys?

@p-kuen
Copy link
Contributor

p-kuen commented Feb 3, 2023

Sorry, we had no time to look at your PR. We will try to review asap.

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