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

[Coil 3] File URI is not decoded #2006

Closed
FooIbar opened this issue Jan 3, 2024 · 1 comment · Fixed by #2027
Closed

[Coil 3] File URI is not decoded #2006

FooIbar opened this issue Jan 3, 2024 · 1 comment · Fixed by #2027

Comments

@FooIbar
Copy link

FooIbar commented Jan 3, 2024

val path = checkNotNull(uri.path) { "path == null" }.toPath()

val timestamp = options.fileSystem.metadata(path.toPath()).lastModifiedAtMillis

Unlike AndroidUri, CoilUri's path holds the encoded path, so it needs to be decoded before being converted to an Okio Path.

@colinrtwhite
Copy link
Member

Thanks for the report - maybe Coil's Uri should store the path as encoded? Will need to evaluate the tradeoffs.

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 a pull request may close this issue.

2 participants