Skip to content

Commit

Permalink
don't write to a temp url if it's already a local file url
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Feb 7, 2016
1 parent 6cea2bf commit a1b6191
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ios/PhotoViewer.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ - (NSURL *)localFileURLForImage:(NSString *)image
NSURL *tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];
NSString *filename = [[NSUUID UUID] UUIDString];
NSURL *fileURL = [NSURL URLWithString:image];
if ([fileURL isFileReferenceURL]) {
return fileURL;
}

NSData *data = [NSData dataWithContentsOfURL:fileURL];

Expand Down

0 comments on commit a1b6191

Please sign in to comment.