[pLog-svn] r5152 - plog/branches/lifetype-1.2/class/template/smarty/internals
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Mar 22 04:47:07 EDT 2007
Author: oscar
Date: 2007-03-22 04:47:07 -0400 (Thu, 22 Mar 2007)
New Revision: 5152
Modified:
plog/branches/lifetype-1.2/class/template/smarty/internals/core.write_file.php
Log:
fix for issue http://bugs.lifetype.net/view.php?id=1226 -- smarty reporting way too many errors in windows when trying to delete files that don't exist. This is a modification to one of the smarty core files, I will see if this can be fed back to the smarty project people.
Modified: plog/branches/lifetype-1.2/class/template/smarty/internals/core.write_file.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/smarty/internals/core.write_file.php 2007-03-21 20:02:34 UTC (rev 5151)
+++ plog/branches/lifetype-1.2/class/template/smarty/internals/core.write_file.php 2007-03-22 08:47:07 UTC (rev 5152)
@@ -41,7 +41,7 @@
// On platforms and filesystems that cannot overwrite with rename()
// delete the file before renaming it -- because windows always suffers
// this, it is short-circuited to avoid the initial rename() attempt
- @unlink($params['filename']);
+ if( file_exists( $params['filename'])) @unlink($params['filename']);
@rename($_tmp_file, $params['filename']);
}
@chmod($params['filename'], $smarty->_file_perms);
More information about the pLog-svn
mailing list