From e71d16ed28c60686f4fd962875ec58aa3a9b0fda Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 20 Mar 2008 14:21:13 +0000 Subject: [PATCH] "fixed not working rename of dirs in the old vfs" --- phpgwapi/inc/class.vfs_sql.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.vfs_sql.inc.php b/phpgwapi/inc/class.vfs_sql.inc.php index df8b66db38..7caf9525e2 100644 --- a/phpgwapi/inc/class.vfs_sql.inc.php +++ b/phpgwapi/inc/class.vfs_sql.inc.php @@ -1980,7 +1980,11 @@ // if the modification time get's set, we also set it in the filesystem, as // the next reload reset it again to the modification time of the filesystem case 'modified': - touch($p->real_full_path,$data['attributes'][$attribute]); + // we only set it if the file already exists, as otherwise renames of directories fail + if (file_exists($p->real_full_path) && $data['attributes'][$attribute]) + { + touch($p->real_full_path,$data['attributes'][$attribute]); + } break; } }