We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b1d94f commit c429475Copy full SHA for c429475
storage/src/ios/storage_reference_ios.mm
@@ -147,12 +147,9 @@
147
future_impl->Complete(handle, kErrorUnknown, "Path cannot be empty.");
148
return GetFileLastResult();
149
}
150
- NSURL* local_file_url = nil;
151
- if ([path_string hasPrefix:@"file://"]) {
152
- // If it starts with the prefix, load it assuming a URL string.
153
- local_file_url = [NSURL URLWithString:path_string];
154
- } else {
155
- // Otherwise, assume it is a file path.
+ NSURL* local_file_url = [NSURL URLWithString:path_string];
+ if (local_file_url == nil) {
+ // If it failed to load as a URL, try loading it is a path.
156
local_file_url = [NSURL fileURLWithPath:path_string];
157
158
// If we still failed to convert the path, error out.
0 commit comments