Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Dec 10, 2007
1 parent 68666dc commit c39754d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions source/ch/cyberduck/core/Preferences.java
Expand Up @@ -249,6 +249,7 @@ protected void setDefaults() {
defaults.put("editor.name", "TextMate");
defaults.put("editor.bundleIdentifier", "com.macromates.textmate");
defaults.put("editor.kqueue.enable", "false");
defaults.put("editor.tmp.directory", NSPathUtilities.temporaryDirectory());

defaults.put("filetype.text.regex",
".*\\.txt|.*\\.cgi|.*\\.htm|.*\\.html|.*\\.shtml|.*\\.xml|.*\\.xsl|.*\\.php|.*\\.php3|" +
Expand Down
12 changes: 5 additions & 7 deletions source/ch/cyberduck/ui/cocoa/odb/Editor.java
Expand Up @@ -21,12 +21,8 @@
import com.apple.cocoa.application.NSWorkspace;
import com.apple.cocoa.foundation.NSBundle;
import com.apple.cocoa.foundation.NSDictionary;
import com.apple.cocoa.foundation.NSPathUtilities;

import ch.cyberduck.core.AbstractPath;
import ch.cyberduck.core.Local;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.Permission;
import ch.cyberduck.core.*;
import ch.cyberduck.ui.cocoa.CDBrowserController;
import ch.cyberduck.ui.cocoa.CDController;
import ch.cyberduck.ui.cocoa.growl.Growl;
Expand All @@ -45,7 +41,8 @@ public abstract class Editor extends CDController {
/**
*
*/
public static Local TEMPORARY_DIRECTORY = new Local(NSPathUtilities.temporaryDirectory());
private Local TEMPORARY_DIRECTORY
= new Local(Preferences.instance().getProperty("editor.tmp.directory"));

private CDBrowserController controller;

Expand Down Expand Up @@ -74,7 +71,8 @@ public Editor(CDBrowserController controller, String bundleIdentifier) {
public void open(Path path) {
edited = (Path) path.clone();

Local folder = new Local(Editor.TEMPORARY_DIRECTORY.getAbsolute(),
Local folder = new Local(
TEMPORARY_DIRECTORY,
edited.getParent().getAbsolute());
folder.mkdir(true);

Expand Down

0 comments on commit c39754d

Please sign in to comment.