Index: /branches/2.2/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- /branches/2.2/phpgwapi/inc/class.vfs_sql.inc.php	(revision 3104)
+++ /branches/2.2/phpgwapi/inc/class.vfs_sql.inc.php	(revision 3534)
@@ -2668,5 +2668,5 @@
 		 * If $data['file_id'] then the file_id is used instead of a path
 		 */
-		function ls ($data)
+		function ls ($data,$recursive)
 		{
 			if (!is_array ($data))
@@ -2826,5 +2826,8 @@
 
 			$dir_clean = $this->clean_string (array ('string' => $dir));
-			$sql .= " FROM phpgw_vfs WHERE ".$query_type." directory = '".$GLOBALS['phpgw']->db->db_addslashes($dir_clean)."'";
+			if ($recursive)
+				$sql .= " FROM phpgw_vfs WHERE ".$query_type." directory like '".$GLOBALS['phpgw']->db->db_addslashes($dir_clean)."%'";
+			else
+				$sql .= " FROM phpgw_vfs WHERE ".$query_type." directory = '".$GLOBALS['phpgw']->db->db_addslashes($dir_clean)."'";
 			$sql .= $this->extra_sql (array ('query_type' => VFS_SQL_SELECT));
 
@@ -2905,4 +2908,5 @@
 				{
 					$dir_handle = opendir ($p->real_full_path);
+
 					while ($filename = readdir ($dir_handle))
 					{
@@ -2932,5 +2936,4 @@
 					$rarray = array ();
 				}
-
 				foreach($rarray as $num => $file_array)
 				{
Index: /branches/2.2/filemanager/inc/class.uiconfig.inc.php
===================================================================
--- /branches/2.2/filemanager/inc/class.uiconfig.inc.php	(revision 3019)
+++ /branches/2.2/filemanager/inc/class.uiconfig.inc.php	(revision 3534)
@@ -183,5 +183,5 @@
 				 'string'        => $name,
 				 'relatives'     => array(RELATIVE_NONE)
-			 ));
+			 ),True);
 			 $bo->vfs->flush_journal(array(
 				 'string' => $name,
Index: /branches/2.2/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /branches/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 3436)
+++ /branches/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 3534)
@@ -1199,5 +1199,5 @@
 			);
 
-			$ls_array = $this->bo->vfs->ls($tmp_arr);
+			$ls_array = $this->bo->vfs->ls($tmp_arr,True);
 
 			while(list($num, $dir) = each($ls_array))
Index: /branches/2.2/filemanager/js/handler.js
===================================================================
--- /branches/2.2/filemanager/js/handler.js	(revision 3019)
+++ /branches/2.2/filemanager/js/handler.js	(revision 3534)
@@ -138,6 +138,11 @@
 		if (parentDir == '/home')
 			parentDir = 'root';
-		next = (folders[i+1]?folders[i+1]:"");
-		folder = new dNode({id:folders[i], caption:name, plusSign:(next.indexOf(folders[i]+'/') == 0), onClick:'load(\''+folders[i]+'\',this)'});
+		var search_child = function(afolders,name){
+			for (j=0; j < afolders.length; j++)
+				if (afolders[j].indexOf(name+'/') == 0)
+					return true;
+			return false;
+		}
+		folder = new dNode({id:folders[i], caption:name, plusSign:search_child(folders,folders[i]), onClick:'load(\''+folders[i]+'\',this)'});
 	        folders_tree.add(folder,parentDir);
 	}
Index: /branches/2.2/filemanager/templates/default/config_folders.tpl
===================================================================
--- /branches/2.2/filemanager/templates/default/config_folders.tpl	(revision 3019)
+++ /branches/2.2/filemanager/templates/default/config_folders.tpl	(revision 3534)
@@ -2,5 +2,5 @@
 <table border="0" cellpadding="1" cellspacing="1" style="width: 400px;">
 	<tbody>
-		<tr style="width: 200px;">
+		<tr style="width: 500px;">
 			<td>
 				<b>{lang_search}</b></td>
@@ -14,5 +14,5 @@
 				<b>{lang_directory}</b></td>
 			<td>
-				<select id="search1" size="5" style="width: 200px;"></select> </td>
+				<select id="search1" size="5" style="width: 500px;"></select> </td>
 			<td>
 				&nbsp;</td>
Index: /branches/2.2/filemanager/templates/default/config_owner.tpl
===================================================================
--- /branches/2.2/filemanager/templates/default/config_owner.tpl	(revision 3019)
+++ /branches/2.2/filemanager/templates/default/config_owner.tpl	(revision 3534)
@@ -2,5 +2,5 @@
 <table border="0" cellpadding="1" cellspacing="1" style="width: 400px;">
 	<tbody>
-		<tr style="width: 200px;">
+		<tr style="width: 500px;">
 			<td>
 				<b>{lang_search}</b></td>
@@ -14,5 +14,5 @@
 				<b>{lang_directory}</b></td>
 			<td>
-				<select id="search1" size="5" style="width: 200px;"></select> </td>
+				<select id="search1" size="5" style="width: 500px;"></select> </td>
 			<td>
 				&nbsp;</td>
@@ -36,5 +36,5 @@
 				<b>{lang_users_and_groups}</b></td>
 			<td valign="top">
-				<select id="search2" size="5" style="width: 200px;"></select> </td>
+				<select id="search2" size="5" style="width: 500px;"></select> </td>
 			<td>
 			<table border="0">
