pixmicat

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/branches/ @ 788  →  /branches/ @ 789
/branches/totalsize_fix/pixmicat.php
@@ -943,17 +943,15 @@
 
if(!is_file($cache_file)){ // 無快取,新增
$size = $FileIO->getCurrentStorageSize();
$sp = fopen($cache_file, 'w');
fwrite($sp, $size); // 寫入目前使用容量值
fclose($sp);
file_put_contents($cache_file, $size, LOCK_EX);
@chmod($cache_file, 0666);
}else{ // 使用快取
$size = file_get_contents($cache_file);
if($delta != 0){ // 快取值更動
$size += $delta;
file_put_contents($cache_file, $size, LOCK_EX);
}
}
if($delta != 0){ // 快取值更動
$size += $delta;
file_put_contents($cache_file, $size, LOCK_EX);
}
return (int)($size / 1024);
}