Merge commit '5f3d07ac96ed87ec03c7b5f7b57c0e3356fcc6c3'
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js b/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js
index 15f0079..f0bc66f 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js
@@ -227,6 +227,11 @@
 			var i = this._getServiceIndex(location);
 			return i === -1 ? _allFileSystemsService.Name : _names[i];
 		};
+		
+		this._getServiceRootURL = function(location) {
+			var i = this._getServiceIndex(location);
+			return i === -1 ? _allFileSystemsService.Location : _fileSystemsRoots[i].Location;
+		};
 	}
 	
 	FileClient.prototype = /**@lends orion.fileClient.FileClient.prototype */ {
@@ -247,6 +252,14 @@
 		},
 		 
 		/**
+		 * Returns the root url of the file service managing this location
+		 * @param location The location of the item 
+		 */
+		fileServiceRootURL: function(location) {
+			return this._getServiceRootURL(location);
+		},
+		 
+		/**
 		 * Obtains the children of a remote resource
 		 * @param location The location of the item to obtain children for
 		 * @return A deferred that will provide the array of child objects when complete
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js b/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
index 1968cd9..9cb41e7 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
@@ -110,7 +110,13 @@
 				this.setLocationByURL(noneRootMeta.Location);
 				locationName = noneRootMeta.Name;
 			} else if(meta){
-				locationName = this._fileService.fileServiceName(meta && meta.Location);
+				if(this._fileService.getService(meta.Location)["search"]){
+					//this.setLocationByURL("");
+					this.setLocationByURL(this._fileService.fileServiceRootURL(meta.Location));
+				} else {
+					this.setLocationByURL(this._fileService.fileServiceRootURL(meta.Location));
+				}
+				locationName = this._fileService.fileServiceName(meta.Location);
 			}
 			var searchInputDom = dojo.byId("search"); //$NON-NLS-0$
 			if(!locationName){