mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
Prevent race condition on thumbnail generation
This commit is contained in:
parent
94d43c2b76
commit
4e6d768dab
2 changed files with 6 additions and 8 deletions
|
|
@ -584,6 +584,9 @@ class commentItem extends Object
|
|||
}
|
||||
}
|
||||
|
||||
// Prevent race condition
|
||||
FileHandler::writeFile($thumbnail_file, '', 'w');
|
||||
|
||||
// Target file
|
||||
$source_file = NULL;
|
||||
$is_tmp_file = FALSE;
|
||||
|
|
@ -685,12 +688,6 @@ class commentItem extends Object
|
|||
return $thumbnail_url;
|
||||
}
|
||||
|
||||
// create an empty file not to attempt to generate the thumbnail afterwards
|
||||
else
|
||||
{
|
||||
FileHandler::writeFile($thumbnail_file, '', 'w');
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue