summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-03-28 12:23:30 +0100
committerDamiano Galassi <[email protected]>2019-03-28 12:23:30 +0100
commit03b850f956490dbdc604e27d27df86eb2cac1213 (patch)
tree6eec3740265b52c2d700af7677896edc3bb2245f /macosx
parent3641e770f58d88aadba8315d1053e01520c46936 (diff)
MacGui: specify is a path is a folder or not when creating an url.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBPresetsViewController.m4
-rw-r--r--macosx/HBSubtitlesController.m2
-rw-r--r--macosx/HandBrakeKitTests/HBJobTests.m6
-rw-r--r--macosx/HandBrakeKitTests/HBJobUndoTests.m4
4 files changed, 8 insertions, 8 deletions
diff --git a/macosx/HBPresetsViewController.m b/macosx/HBPresetsViewController.m
index 470776b9b..5e1411cd1 100644
--- a/macosx/HBPresetsViewController.m
+++ b/macosx/HBPresetsViewController.m
@@ -159,7 +159,7 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
panel.title = NSLocalizedString(@"Export presets", @"Export presets save panel title");
// We get the current file name and path from the destination field here
- NSURL *defaultExportDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop"];
+ NSURL *defaultExportDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop" isDirectory:YES];
panel.directoryURL = defaultExportDirectory;
panel.nameFieldStringValue = [NSString stringWithFormat:@"%@.json", selectedPreset.name];
@@ -190,7 +190,7 @@ static void *HBPresetsViewControllerContext = &HBPresetsViewControllerContext;
}
else
{
- panel.directoryURL = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop"];
+ panel.directoryURL = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop" isDirectory:YES];
}
[panel beginWithCompletionHandler:^(NSInteger result)
diff --git a/macosx/HBSubtitlesController.m b/macosx/HBSubtitlesController.m
index b9c88e940..58767d7e3 100644
--- a/macosx/HBSubtitlesController.m
+++ b/macosx/HBSubtitlesController.m
@@ -91,7 +91,7 @@
}
else
{
- sourceDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop"];
+ sourceDirectory = [[NSURL fileURLWithPath:NSHomeDirectory()] URLByAppendingPathComponent:@"Desktop" isDirectory:YES];
}
panel.directoryURL = sourceDirectory;
diff --git a/macosx/HandBrakeKitTests/HBJobTests.m b/macosx/HandBrakeKitTests/HBJobTests.m
index d4a91863d..9848bbe5b 100644
--- a/macosx/HandBrakeKitTests/HBJobTests.m
+++ b/macosx/HandBrakeKitTests/HBJobTests.m
@@ -40,7 +40,7 @@
self.preset = self.manager.defaultPreset;
- NSURL *sampleURL = [NSURL fileURLWithPath:@"/test.mp4"];
+ NSURL *sampleURL = [NSURL fileURLWithPath:@"/test.mp4" isDirectory:NO];
self.queue = dispatch_queue_create("fr.handbrake.testQueue", DISPATCH_QUEUE_SERIAL);
dispatch_semaphore_t sem = dispatch_semaphore_create(0);
@@ -57,7 +57,7 @@
self.title = self.core.titles.firstObject;
self.job = [[HBJob alloc] initWithTitle:self.title andPreset:self.preset];
- self.job.outputURL = [NSURL fileURLWithPath:@"/"];
+ self.job.outputURL = [NSURL fileURLWithPath:@"/" isDirectory:YES];
self.job.outputFileName = @"Dest.mp4";
}
@@ -83,7 +83,7 @@
XCTAssertNotNil(self.job);
- self.job.outputURL = [NSURL fileURLWithPath:@"/"];
+ self.job.outputURL = [NSURL fileURLWithPath:@"/" isDirectory:YES];
self.job.outputFileName = @"Dest.mp4";
[job applyPreset:preset];
}
diff --git a/macosx/HandBrakeKitTests/HBJobUndoTests.m b/macosx/HandBrakeKitTests/HBJobUndoTests.m
index ab2e5534f..7ec26a130 100644
--- a/macosx/HandBrakeKitTests/HBJobUndoTests.m
+++ b/macosx/HandBrakeKitTests/HBJobUndoTests.m
@@ -41,7 +41,7 @@
self.preset = self.manager.defaultPreset;
- NSURL *sampleURL = [NSURL fileURLWithPath:@"/test.mp4"];
+ NSURL *sampleURL = [NSURL fileURLWithPath:@"/test.mp4" isDirectory:NO];
self.queue = dispatch_queue_create("fr.handbrake.testQueue", DISPATCH_QUEUE_SERIAL);
dispatch_semaphore_t sem = dispatch_semaphore_create(0);
@@ -58,7 +58,7 @@
self.title = self.core.titles.firstObject;
self.job = [[HBJob alloc] initWithTitle:self.title andPreset:self.preset];
- self.job.outputURL = [NSURL fileURLWithPath:@"/"];
+ self.job.outputURL = [NSURL fileURLWithPath:@"/" isDirectory:YES];
self.job.outputFileName = @"Dest.mp4";
NSUndoManager *undoManager = [[NSUndoManager alloc] init];