diff options
author | ritsuka <[email protected]> | 2014-07-31 17:11:14 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-07-31 17:11:14 +0000 |
commit | c229708133e2b74931def4da7403d2ceb5a24b21 (patch) | |
tree | a67625634abbd986de3c0dbacbf1f29736317d47 /macosx/HBPreviewGenerator.m | |
parent | f91c7a92b91205c8412283865583a54529a18568 (diff) |
MacGui: removed another duplicated method to get the Application Support path.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6252 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewGenerator.m')
-rw-r--r-- | macosx/HBPreviewGenerator.m | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m index 2ea7b2aad..64effac2c 100644 --- a/macosx/HBPreviewGenerator.m +++ b/macosx/HBPreviewGenerator.m @@ -6,6 +6,7 @@ // #import "HBPreviewGenerator.h" +#import "HBUtilities.h" #import "Controller.h" typedef enum EncodeState : NSUInteger { @@ -162,26 +163,9 @@ typedef enum EncodeState : NSUInteger { #pragma mark - #pragma mark Preview movie -+ (NSString *) appSupportPath -{ - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSString *appSupportPath = nil; - - NSArray *allPaths = NSSearchPathForDirectoriesInDomains( NSApplicationSupportDirectory, - NSUserDomainMask, - YES ); - if ([allPaths count]) - appSupportPath = [[allPaths objectAtIndex:0] stringByAppendingPathComponent:@"HandBrake"]; - - if (![fileManager fileExistsAtPath:appSupportPath]) - [fileManager createDirectoryAtPath:appSupportPath withIntermediateDirectories:YES attributes:nil error:NULL]; - - return appSupportPath; -} - + (NSURL *) generateFileURLForType:(NSString *) type { - NSString *previewDirectory = [NSString stringWithFormat:@"%@/Previews/%d", [HBPreviewGenerator appSupportPath], getpid()]; + NSString *previewDirectory = [NSString stringWithFormat:@"%@/Previews/%d", [HBUtilities appSupportPath], getpid()]; if (![[NSFileManager defaultManager] fileExistsAtPath:previewDirectory]) { |