diff --git a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php index 2cf366d3b7..323960baf1 100644 --- a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php @@ -889,6 +889,10 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper } $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_uid=:fs_uid WHERE fs_id=:fs_id'); + // update stat-cache + if ($path != '/' && substr($path,-1) == '/') $path = substr($path, 0, -1); + self::$stat_cache[$path]['fs_uid'] = $owner; + return $stmt->execute(array( 'fs_uid' => (int) $owner, 'fs_id' => $stat['ino'], @@ -930,6 +934,10 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper } $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_gid=:fs_gid WHERE fs_id=:fs_id'); + // update stat-cache + if ($path != '/' && substr($path,-1) == '/') $path = substr($path, 0, -1); + self::$stat_cache[$path]['fs_gid'] = $owner; + return $stmt->execute(array( 'fs_gid' => $owner, 'fs_id' => $stat['ino'], @@ -969,6 +977,10 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper } $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_mode=:fs_mode WHERE fs_id=:fs_id'); + // update stat cache + if ($path != '/' && substr($path,-1) == '/') $path = substr($path, 0, -1); + self::$stat_cache[$path]['fs_mode'] = ((int) $mode) & 0777; + return $stmt->execute(array( 'fs_mode' => ((int) $mode) & 0777, // we dont store the file and dir bits, give int overflow! 'fs_id' => $stat['ino'],