--- class.vfs_dav.inc.php.proget_fixed	2004-09-28 13:23:07.000000000 +0200
+++ class.vfs_dav.inc.php	2004-09-28 14:59:07.000000000 +0200
@@ -638,7 +642,14 @@
 			$parsed_url['user'] = $this->dav_user;
 			$rarray['real_full_secure_url'] = $this->glue_url($parsed_url);
 			
-			
+			if ( strlen($rarray['real_full_path']) > 1 )
+			{
+				if ( ereg('.*/$', $rarray['real_full_path']) )
+				{
+					$rarray['real_full_path'] =  substr($rarray['real_full_path'], 0, (strlen($rarray['real_full_path']) - 1));
+				}
+			}
+
 			/*
 			   We have to count it before because new keys will be added,
 			   which would create an endless loop
@@ -2423,7 +2435,7 @@
 			  else return $this->get_ext_mime_type(array('string' => $p->real_full_path));
 
 			}
-			$tmp_prop=$this->dav_client->get_properties($p->real_full_path);
+			$tmp_prop=$this->dav_client->get_properties($p->real_full_path,0);
 $this->debug('tmpprop: '.$p->real_full_path);
 $this->debug($tmp_prop);
			$mime_type=$tmp_prop[$p->real_full_path]['mime_type'];
@@ -2694,36 +2709,18 @@
 			)
 			{
 $this->debug('ls branch 1');
-			$prop=$this->dav_client->get_properties($p->real_full_path, 1);
-			//make the key the 'orderby' attribute
-			if (! ($data['orderby'] == 'directory'))
-			{
-				$tmp_prop = array();
-				$id=0;
-				foreach ( $prop as $key=>$value)
-				{
-					$id++;
-					$new_key =  substr($value[$data['orderby']].'        ',0, 8);
-					$tmp_prop[strtolower($new_key).'_'.$id] = $value;
-				}
-			}
-			else 
-			{
-				$tmp_prop = $prop;
-			}
-			ksort($tmp_prop);
-			$rarray = array ();
-			foreach($tmp_prop as $idx => $value)
-			{
-				if($value['mime_type']==$data['mime_type'] or $data['mime_type']=='')
-				{
-					$directory = $this->path_parts($value['directory']);
-					$value['directory'] = $directory->fake_full_path;
-					if($value['is_dir']) $value['mime_type']='Directory';
-					$rarray[] = $value;
-				}
-			}
+				$prop=$this->dav_client->get_properties($p->real_full_path, 0);
+
+				$rarray = array ();
+
+				$value = $prop[$p->real_full_path];
+
+				$directory = $this->path_parts($value['directory']);
+				$value['directory'] = $directory->fake_full_path;
+				if($value['is_dir']) $value['mime_type']='Directory';
+				$rarray[0] = $value;
+
 $this->debug('ls returning 1:');
 				return $rarray;
 			}

