Skip to content

Commit

Permalink
Merge pull request #36 from saturngod/master
Browse files Browse the repository at this point in the history
Support Full Path
  • Loading branch information
gdavis committed May 7, 2013
2 parents 1406fca + b23839a commit 63597b5
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions FGallery/Classes/FGalleryPhoto.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ - (void)loadFullsizeInThread
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

NSString *path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _fullsizeUrl];
NSString *path;

if([[NSFileManager defaultManager] fileExistsAtPath:_fullsizeUrl])
{
path = _fullsizeUrl;
}
else {
path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _fullsizeUrl];
}

_fullsize = [[UIImage imageWithContentsOfFile:path] retain];

_hasFullsizeLoaded = YES;
Expand All @@ -139,7 +148,16 @@ - (void)loadThumbnailInThread
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

NSString *path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _thumbUrl];
NSString *path;

if([[NSFileManager defaultManager] fileExistsAtPath:_thumbUrl])
{
path = _thumbUrl;
}
else {
path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _thumbUrl];
}

_thumbnail = [[UIImage imageWithContentsOfFile:path] retain];

_hasThumbLoaded = YES;
Expand Down

1 comment on commit 63597b5

@Happy5Oceans
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not work in IOS7 when pressed back btn

Please sign in to comment.