"fix for bug #1867: Several problems with non-ascii as first char in filename:

that char is skiped in dir creation, rename or filecreation"
This commit is contained in:
Ralf Becker 2009-04-09 13:24:40 +00:00
parent d3110dfdf3
commit af08fbb532

View File

@ -190,7 +190,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
$stmt = self::$pdo->prepare($query='INSERT INTO '.self::TABLE.' (fs_name,fs_dir,fs_mode,fs_uid,fs_gid,fs_created,fs_modified,fs_creator,fs_mime,fs_size'.
') VALUES (:fs_name,:fs_dir,:fs_mode,:fs_uid,:fs_gid,:fs_created,:fs_modified,:fs_creator,:fs_mime,:fs_size)');
$values = array(
'fs_name' => basename($path),
'fs_name' => egw_vfs::basename($path),
'fs_dir' => $dir_stat['ino'],
// we use the mode of the dir, so files in group dirs stay accessible by all members
'fs_mode' => $dir_stat['mode'] & 0666,
@ -573,7 +573,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_dir=:fs_dir,fs_name=:fs_name WHERE fs_id=:fs_id');
return $stmt->execute(array(
':fs_dir' => $to_dir_stat['ino'],
':fs_name' => basename($path_to),
':fs_name' => egw_vfs::basename($path_to),
':fs_id' => $from_stat['ino'],
));
}
@ -646,7 +646,7 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
$stmt = self::$pdo->prepare('INSERT INTO '.self::TABLE.' (fs_name,fs_dir,fs_mode,fs_uid,fs_gid,fs_size,fs_mime,fs_created,fs_modified,fs_creator'.
') VALUES (:fs_name,:fs_dir,:fs_mode,:fs_uid,:fs_gid,:fs_size,:fs_mime,:fs_created,:fs_modified,:fs_creator)');
return $stmt->execute(array(
':fs_name' => basename($path),
':fs_name' => egw_vfs::basename($path),
':fs_dir' => $parent['ino'],
':fs_mode' => $parent['mode'],
':fs_uid' => $parent['uid'],