Merge pull request #9 from timar/master
remove temp file only when all edit instances are closed
This commit is contained in:
commit
253583537d
@ -209,7 +209,11 @@ class DocumentController extends Controller{
|
|||||||
|
|
||||||
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . $basename;
|
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . $basename;
|
||||||
|
|
||||||
|
// remove temp file only when all edit instances are closed
|
||||||
|
$stat = stat($filename);
|
||||||
|
if ($stat['nlink'] == 1){
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'status' => 'success'
|
'status' => 'success'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user