Skip to content

Commit

Permalink
Merge pull request #14 from RangerRick/master
Browse files Browse the repository at this point in the history
don't write to a temp url if it's already a local file url
  • Loading branch information
sarriaroman committed Feb 8, 2016
2 parents 6cea2bf + a1b6191 commit 3e49ea4
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 3e49ea4

Please sign in to comment.