aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleEditorController.m2
-rw-r--r--Source/SPFileManagerAdditions.h2
-rw-r--r--Source/SPFileManagerAdditions.m9
-rw-r--r--Source/SPSSHTunnel.m2
4 files changed, 12 insertions, 3 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 4be98c40..1075abb0 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -1546,7 +1546,7 @@
NSString *bundleFileName = [bundleDict objectForKey:kBundleNameKey];
NSString *possibleExisitingBundleFilePath = [NSString stringWithFormat:@"%@/%@.%@", bundlePath, bundleFileName, SPUserBundleFileExtension];
- draggedFilePath = [[NSString stringWithFormat:@"/tmp/%@.%@", bundleFileName, SPUserBundleFileExtension] retain];
+ draggedFilePath = [[NSString stringWithFormat:@"%@/%@.%@", [NSFileManager temporaryDirectory], bundleFileName, SPUserBundleFileExtension] retain];
BOOL isDir;
diff --git a/Source/SPFileManagerAdditions.h b/Source/SPFileManagerAdditions.h
index 6ac7811c..0fc39334 100644
--- a/Source/SPFileManagerAdditions.h
+++ b/Source/SPFileManagerAdditions.h
@@ -26,5 +26,5 @@
- (NSString *)applicationSupportDirectoryForSubDirectory:(NSString*)subDirectory error:(NSError **)errorOut;
- (NSString *)applicationSupportDirectoryForSubDirectory:(NSString*)subDirectory createIfNotExists:(BOOL)create error:(NSError **)errorOut;
-
++ (NSString *)temporaryDirectory;
@end
diff --git a/Source/SPFileManagerAdditions.m b/Source/SPFileManagerAdditions.m
index 22becf92..39cf9f85 100644
--- a/Source/SPFileManagerAdditions.m
+++ b/Source/SPFileManagerAdditions.m
@@ -147,4 +147,13 @@ NSString* const DirectoryLocationDomain = @"DirectoryLocationDomain";
}
++ (NSString *)temporaryDirectory
+{
+ NSString *tempDir = NSTemporaryDirectory();
+ if (!tempDir) {
+ tempDir = @"/tmp";
+ }
+ return tempDir;
+}
+
@end
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index 51100c97..23e245a2 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -298,7 +298,7 @@
[taskArguments addObject:@"-N"]; // Tunnel only
[taskArguments addObject:@"-v"]; // Verbose mode for messages
[taskArguments addObject:@"-o ControlMaster=auto"]; // Support 'master' mode for connection sharing
- [taskArguments addObject:@"-o ControlPath=/tmp/SequelPro-%r@%h:%p"]; // Set a custom control path to avoid picking up existing masters without forwarding enabled
+ [taskArguments addObject:[NSString stringWithFormat:@"-o ControlPath=%@/SequelPro-%%r@%%h:%%p", [NSFileManager temporaryDirectory]]]; // Set a custom control path to avoid picking up existing masters without forwarding enabled
[taskArguments addObject:@"-o ExitOnForwardFailure=yes"];
[taskArguments addObject:[NSString stringWithFormat:@"-o ConnectTimeout=%ld", (long)connectionTimeout]];
[taskArguments addObject:@"-o NumberOfPasswordPrompts=3"];