aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Luong2013-06-21 02:14:01 (EDT)
committerMark Macdonald2013-06-21 12:15:01 (EDT)
commit0462525ec7ec8265f831b70c76c7824ae4161376 (patch)
tree41af09cdd8d6dc25a19460273156a4b86223cab9
parent8993783482d7e6ff53abfef0fafad4b920920a8b (diff)
downloadorg.eclipse.orion.client-0462525ec7ec8265f831b70c76c7824ae4161376.zip
org.eclipse.orion.client-0462525ec7ec8265f831b70c76c7824ae4161376.tar.gz
org.eclipse.orion.client-0462525ec7ec8265f831b70c76c7824ae4161376.tar.bz2
Bug 411316 - [navigator] "Go Up" on remote filesystem takes you to the Orion fs root
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/navigate/table.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
index 2012c09..4f2706c 100644
--- a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
+++ b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
@@ -62,12 +62,13 @@ define(['require', 'i18n!orion/navigate/nls/messages', 'orion/browserCompatibili
// On scope up, change the href of the window.location to navigate to the parent page.
// TODO reuse eclipse.upFolder
explorer.scopeUp = function() {
- if(this.treeRoot && this.treeRoot.Parents){
+ var root = this.treeRoot, parents = root && root.Parents;
+ if (parents) {
var resource;
- if(this.treeRoot.Parents.length === 0){
- resource = ""; //$NON-NLS-0$
- } else if(this.treeRoot.Parents[0].ChildrenLocation){
- resource = this.treeRoot.Parents[0].ChildrenLocation;
+ if (parents.length === 0) {
+ resource = fileClient.fileServiceRootURL(root.Location);
+ } else {
+ resource = parents[0].ChildrenLocation;
}
setResource(resource);
}