fix for reading empty files. This caused problems with mac os x as WebDAV client

This commit is contained in:
Cornelius Weiß 2007-11-18 20:04:58 +00:00
parent b0677b31e3
commit a1eb61f102

View File

@ -771,7 +771,17 @@
{
if (($fp = fopen ($p->real_full_path, 'rb')))
{
$contents = fread ($fp, filesize ($p->real_full_path));
if (filesize($p->real_full_path) > 0)
{
$contents = fread ($fp, filesize($p->real_full_path));
}
else
{
// files could also have no contents. In this case
// the second parameter should not be present!
$contents = fread ($fp);
}
fclose ($fp);
}
else