fixed #50, file_put_contents함수에 LOCK_EX flag 적

This commit is contained in:
khongchi 2013-11-15 12:56:29 +09:00
parent ab021d75c7
commit 71c8a0b99f
11 changed files with 14 additions and 14 deletions

View file

@ -86,7 +86,7 @@ function execute($dir) {
$content = JSMinPlus::minify($content);
}
file_put_contents($target, $copyright.$content);
file_put_contents($target, $copyright.$content, LOCK_EX);
echo '.';
}
@ -107,7 +107,7 @@ function execute($dir) {
$target = preg_replace('@\.css$@', '.min.css', $file);
$content = file_get_contents($file);
file_put_contents($target, $copyright.$oCSSmin->run($content));
file_put_contents($target, $copyright.$oCSSmin->run($content), LOCK_EX);
echo '.';
}
echo " Done\n";
@ -167,7 +167,7 @@ function merge($files, $target, $base_dir) {
if ($body) {
$file_count = count($files);
echo " Merging {$file_count} files to create {$target} file...";
file_put_contents($base_dir.$target, $body);
file_put_contents($base_dir.$target, $body, LOCK_EX);
echo " Done\n";
}
}