mirror of https://github.com/HandBrake/HandBrake
MacGui: try to recreate the tmp folder only on macOS 14 and later
It shouldn't make a difference, but maybe it
will help on macOS 13.
(cherry picked from commit ca9906773b)
This commit is contained in:
parent
330a666f03
commit
cf413f12b1
|
|
@ -157,14 +157,17 @@ HB_OBJC_DIRECT_MEMBERS
|
|||
return nil;
|
||||
}
|
||||
|
||||
// macOS Sonoma moved the parent of our temporary folder
|
||||
// to the app sandbox container, and the user might have deleted it,
|
||||
// so ensure the whole path is available to avoid failing later
|
||||
// when trying to write the temp files
|
||||
NSURL *directoryURL = HBCore.temporaryDirectoryURL;
|
||||
if (directoryURL)
|
||||
if (@available(macOS 14, *))
|
||||
{
|
||||
[NSFileManager.defaultManager createDirectoryAtURL:directoryURL withIntermediateDirectories:YES attributes:nil error:NULL];
|
||||
// macOS Sonoma moved the parent of our temporary folder
|
||||
// to the app sandbox container, and the user might have deleted it,
|
||||
// so ensure the whole path is available to avoid failing later
|
||||
// when trying to write the temp files
|
||||
NSURL *directoryURL = HBCore.temporaryDirectoryURL;
|
||||
if (directoryURL)
|
||||
{
|
||||
[NSFileManager.defaultManager createDirectoryAtURL:directoryURL withIntermediateDirectories:YES attributes:nil error:NULL];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue