tracked down 0 byte files
| From: | Marc Logemann | Date: | Sat, 29 Dec 2001 21:41:34 +0000 |
| Subject: | tracked down 0 byte files | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2442@lists.php.net to get a copy of this message | ||
Hi,
i tracked down why i have 0 byte files in templates_c.
on line 1291 in smarty.class there will be only fwrite
when PHP gets an exclusive file lock via: flock($fd, LOCK_EX)
if not (and this is sometimes the case on my system...didnt digged
into this yet) there is no fwrite, but there was an fopen(w) before.
This means smarty writes a 0 byte file. It would be better to delete
this 0 byte file in case of a failure getting the file lock, cause
a 0 byte file result in a situation where smarty never display this
template again.
Any ideas?