Uses the filePathURL where possibile.
This commit is contained in:
1 parent
90be068c6d
commit
b1d1d1dd25
1 file changed
+5
-2
+5
-2
@@ -526,7 +526,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
|||||||
#else
|
#else
|
||||||
// Snow Leopard has got some issue with file reference URLs so here's a workaround
|
// Snow Leopard has got some issue with file reference URLs so here's a workaround
|
||||||
if (NSAppKitVersionNumber <= NSAppKitVersionNumber10_6) {
|
if (NSAppKitVersionNumber <= NSAppKitVersionNumber10_6) {
|
||||||
tempURL = [[NSURL fileURLWithPath:[self.URL path]] URLByDeletingLastPathComponent];
|
tempURL = [[self.URL filePathURL] URLByDeletingLastPathComponent];
|
||||||
} else {
|
} else {
|
||||||
tempURL = [self.URL URLByDeletingLastPathComponent];
|
tempURL = [self.URL URLByDeletingLastPathComponent];
|
||||||
}
|
}
|
||||||
@@ -617,6 +617,9 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
|||||||
unsigned long long originalFileSize = [[[fileManager attributesOfItemAtPath:[self.URL path] error:NULL] valueForKey:NSFileSize] unsignedLongLongValue];
|
unsigned long long originalFileSize = [[[fileManager attributesOfItemAtPath:[self.URL path] error:NULL] valueForKey:NSFileSize] unsignedLongLongValue];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
||||||
|
NSLog(@"%@", self.URL);
|
||||||
|
NSLog(@"%@", url);
|
||||||
|
|
||||||
noErr = [fileManager copyItemAtURL:self.URL toURL:url error:outError];
|
noErr = [fileManager copyItemAtURL:self.URL toURL:url error:outError];
|
||||||
if (!noErr && *outError) {
|
if (!noErr && *outError) {
|
||||||
[*outError retain];
|
[*outError retain];
|
||||||
@@ -1054,7 +1057,7 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if ([self.URL isFileReferenceURL]) {
|
if ([self.URL isFileReferenceURL]) {
|
||||||
[coder encodeObject:[NSURL fileURLWithPath:[self.URL path]] forKey:@"fileUrl"];
|
[coder encodeObject:[self.URL filePathURL] forKey:@"fileUrl"];
|
||||||
} else {
|
} else {
|
||||||
[coder encodeObject:self.URL forKey:@"fileUrl"];
|
[coder encodeObject:self.URL forKey:@"fileUrl"];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user