diff options
author | Urban Müller | 2024-12-03 00:05:22 +0100 |
---|---|---|
committer | Urban Müller | 2024-12-03 00:05:22 +0100 |
commit | e490f99bafee3acf49196b5838d052a9aca98d5a (patch) | |
tree | 8a926e4763fca3d397b148f8bc7483888149d3f7 | |
parent | 15b450b9405529ae943bb7761e76b7adc5cda8e6 (diff) | |
download | itools-master.tar.gz itools-master.tar.bz2 itools-master.zip |
-rw-r--r-- | it.class | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1217,8 +1217,12 @@ static function file_put($filename, $data, $p = array()) $tmpdir = is_dir($tmp) && is_writable($tmp) && stat($tmp)[0] == stat(dirname($filename))[0] ? $tmp : dirname($filename); $tmpfile = "$tmpdir/.it_put." . basename($filename) . "." . getmypid(); if (($result = it::file_put_contents($filename == "-" ? "php://stdout" : $tmpfile, $data)) !== false && $filename != "-") + { if (($result = rename($tmpfile, $filename)) && $p['cdist']) $result = it::cdist($filename); + else + @unlink($tmpfile); + } return $result; } |