mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
Silence chmod() warnings (operation not permitted) when using CIFS mounts and possibly other cases.
This commit is contained in:
@@ -1069,7 +1069,7 @@ class Twig_Environment
|
|||||||
if (false !== @file_put_contents($tmpFile, $content)) {
|
if (false !== @file_put_contents($tmpFile, $content)) {
|
||||||
// rename does not work on Win32 before 5.2.6
|
// rename does not work on Win32 before 5.2.6
|
||||||
if (@rename($tmpFile, $file) || (@copy($tmpFile, $file) && unlink($tmpFile))) {
|
if (@rename($tmpFile, $file) || (@copy($tmpFile, $file) && unlink($tmpFile))) {
|
||||||
chmod($file, 0644);
|
@chmod($file, 0644);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user