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: check if file path already has file prefix in it #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swizes
Copy link

@swizes swizes commented Feb 7, 2025

Fix duplicate "file://" prefix in image picker result path

The URL's absoluteString from both iOS Simulator and physical devices already contains the "file://" prefix. Previously, we were unconditionally adding another prefix, resulting in malformed paths like "file://file://...".

Added a check to only prepend "file://" if it's not already present in the path. While this scenario hasn't been observed in testing, this change makes the code more robust by handling edge cases where the prefix might be missing.

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.

1 participant