NSString *dateForLogTitle = [NSString stringWithFormat:@"%02d-%02d-%02d %02d-%02d-%02d",now->tm_year + 1900, now->tm_mon + 1, now->tm_mday,now->tm_hour, now->tm_min, now->tm_sec];
/* Assemble the new log file name as YY-MM-DD HH-MM-SS mymoviename.txt */
- NSString *outputDateFileName = [NSString stringWithFormat:@"%@ %@.txt",dateForLogTitle,[[outputFileForEncode lastPathComponent] stringByDeletingPathExtension]];
+ NSString *outputDateFileName = [NSString stringWithFormat:@"%@ %@.txt",[[outputFileForEncode lastPathComponent] stringByDeletingPathExtension],dateForLogTitle];
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"EncodeLogLocation"]) // if we are putting it in the same directory with the movie
{
if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
{
[[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory
- attributes:nil];
+ withIntermediateDirectories:NO
+ attributes:nil
+ error:nil];
}
outputLogFileForEncode = [[NSString stringWithFormat:@"%@/%@",encodeLogDirectory,outputDateFileName] retain];
}
if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
{
[[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory
- attributes:nil];
+ withIntermediateDirectories:NO
+ attributes:nil
+ error:nil];
}
NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@", @"tell application \"Finder\" to open (POSIX file \"", encodeLogDirectory, @"\")"]];