--- class.vfs_dav.inc.php.proget_base	2004-09-28 11:34:34.000000000 +0200
+++ class.vfs_dav.inc.php	2004-09-28 12:54:52.000000000 +0200
@@ -887,10 +887,14 @@
 				 We don't use ls () to get owner_id as we normally would,
 				 because ls () calls acl_check (), which would create an infinite loop
 				 */
+
 				$this->override_acl=1; /* To avoid a loop */
+
 				$file_info = $this->ls($data);
+
 				$this->override_acl=0;
-				$owner_id = $file_info['owner_id'];
+
+				$owner_id = $file_info[0]['owner_id'];
 			}
 			else
 			{
@@ -1425,15 +1429,6 @@
 
 			//umask(000);
 
-			/*
-			   If 'string' doesn't exist, touch () creates both the file and the database entry
-			   If 'string' does exist, touch () sets the modification time and modified by
-			*/
-			/*$this->touch (array(
-					'string'	=> $p->fake_full_path,
-					'relatives'	=> array ($p->mask)
-				)
-			);*/
 			
 			$size=strlen($data['content']);
 			if ($p->outside)
@@ -1457,6 +1452,23 @@
 				}
 				else
 				{
+
+					/*
+					   If 'string' doesn't exist, touch () creates both the file and the database entry
+					   If 'string' does exist, touch () sets the modification time and modified by
+					*/
+					$this->touch (array(
+							'string'	=> $p->fake_full_path,
+							'relatives'	=> array ($p->mask)
+						)
+					);
+
+					$this->correct_attributes (array(
+							'string'	=> $p->fake_full_path,
+							'relatives'	=> array ($p->mask)
+						)
+					);
+					
 					return True;
 				}
 			}
@@ -2106,6 +2118,33 @@
 				))
 			)
 			{
+				$this->set_attributes(array(
+					'string'	=> $p->fake_full_path,
+					'relatives'	=> array ($p->mask),
+					'attributes'	=> array (
+								'createdby_id' => $account_id,
+//								'size' => 4096,
+								'mime_type' => 'Directory',
+								'created' => $this->now,
+//								'deleteable' => 'Y',
+//								'app' => $currentapp
+							)
+					)
+				);
+
+				$this->correct_attributes (array(
+						'string'	=> $p->fake_full_path,
+						'relatives'	=> array ($p->mask)
+					)
+				);
+
+//				$this->add_journal (array(
+//						'string'	=> $p->fake_full_path,
+//						'relatives'	=> array ($p->mask),
+//						'operation'	=> VFS_OPERATION_CREATED
+//					)
+//				);
+
 				/*Now we need to set access control for this dir.  Simply create an .htaccess
 				file limiting access to this user, if we are creating this dir in the user's home dir*/
 				$homedir = $this->fakebase.'/'.$this->dav_user; 
@@ -2338,7 +2377,7 @@
 			}
 
 			$this->set_attributes (array(
-					'string'	=> $p->fake_full_name,
+					'string'	=> $p->fake_full_path,
 					'relatives'	=> array ($p->mask),
 					'attributes'	=> $set_attributes_array
 				)
