Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index d08346b71..0545ac4de 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1502,9 +1502,9 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
FileDialog dialog= new FileDialog(shell, SWT.SAVE);
IPath oldPath= URIUtil.toPath(((IURIEditorInput)input).getURI());
- if (oldPath != null) {
+ if (oldPath != null && !oldPath.isEmpty()) {
dialog.setFileName(oldPath.lastSegment());
- dialog.setFilterPath(oldPath.toOSString());
+ dialog.setFilterPath(oldPath.removeLastSegments(1).toOSString());
}
String path= dialog.open();

Back to the top