mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-08 14:30:05 +01:00
fix for reading empty files. This caused problems with mac os x as WebDAV client
This commit is contained in:
parent
6be088d539
commit
0c2ed61d02
@ -770,8 +770,18 @@
|
|||||||
if ($this->file_actions || $p->outside)
|
if ($this->file_actions || $p->outside)
|
||||||
{
|
{
|
||||||
if (($fp = fopen ($p->real_full_path, 'rb')))
|
if (($fp = fopen ($p->real_full_path, 'rb')))
|
||||||
|
{
|
||||||
|
if (filesize($p->real_full_path) > 0)
|
||||||
{
|
{
|
||||||
$contents = fread ($fp, filesize($p->real_full_path));
|
$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);
|
fclose ($fp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user