From 827eb9a223de63cbd4a180ec8065130e517ae13e Mon Sep 17 00:00:00 2001 From: skeeter Date: Thu, 27 Dec 2001 15:20:03 +0000 Subject: [PATCH] one big irritation was that the pwd() function would return an extra space at the end of the directory name. This shouldn't have occured, because spaces are not allowed as the first/last character of the name. --- phpgwapi/inc/class.vfs_sql.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.vfs_sql.inc.php b/phpgwapi/inc/class.vfs_sql.inc.php index 4ae0864f13..2d4b86c95e 100644 --- a/phpgwapi/inc/class.vfs_sql.inc.php +++ b/phpgwapi/inc/class.vfs_sql.inc.php @@ -1124,7 +1124,7 @@ $currentdir = '/'; } - return $currentdir; + return trim($currentdir); } /*! @@ -1621,9 +1621,9 @@ if ($this->file_type ($string, array ($relatives[0])) != 'Directory') { - $this->add_journal ($p->fake_full_path, array ($p->mask), VFS_OPERATION_DELETED); + $this->add_journal ($string, array ($relatives[0]), VFS_OPERATION_DELETED); - $query = $GLOBALS['phpgw']->db->query ("DELETE FROM phpgw_vfs WHERE directory='$p->fake_leading_dirs_clean' AND name='$p->fake_name_clean'" . $this->extra_sql (VFS_SQL_DELETE), __LINE__, __FILE__); + $query = $GLOBALS['phpgw']->db->query ("DELETE FROM phpgw_vfs WHERE directory='".$p->fake_leading_dirs_clean."' AND name='".$p->fake_name_clean."'".$this->extra_sql (VFS_SQL_DELETE), __LINE__, __FILE__); $rr = unlink ($p->real_full_path); if ($query || $rr) @@ -1647,7 +1647,7 @@ continue; } - $this->rm ("$entry[directory]/$entry[name]", array ($p->mask)); + $this->rm ($entry[directory].SEP.$entry[name], array ($p->mask)); } /* Now we cycle through again and delete the directories */