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

Fix parsing paths containing # in FileUriMapper. #1466

Merged
merged 2 commits into from Sep 19, 2022

Conversation

colinrtwhite
Copy link
Member

Fixes: #1344

@colinrtwhite colinrtwhite merged commit 6d7506d into main Sep 19, 2022
@colinrtwhite colinrtwhite deleted the colin/file_mapper_chars branch September 19, 2022 01:55
colinrtwhite added a commit that referenced this pull request Oct 5, 2022
* Fix parsing paths containing # in FileUriMapper.

* Rename test.
@@ -11,7 +11,8 @@ internal class FileUriMapper : Mapper<Uri, File> {

override fun map(data: Uri, options: Options): File? {
if (!isApplicable(data)) return null
return File(data.path!!)
val uri = if (data.scheme == null) data else data.buildUpon().scheme(null).build()
return File(uri.toString())

Choose a reason for hiding this comment

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

Well that was a breaking change for us as we were previously sending local image's uri, now uri.path works, you should have document this

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.

File name contain '#' load error.
2 participants