mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Merge commit 'df76c02e7ac3bfbde8ecb597653779e8e1516f58'
# Conflicts: # resources/vanilla # tests/phpstan/configs/l7-baseline.neon
This commit is contained in:
commit
a8180cdf0b
@ -281,6 +281,8 @@ namespace pocketmine {
|
||||
|
||||
echo Terminal::$FORMAT_RESET . PHP_EOL;
|
||||
|
||||
Filesystem::releaseLockFile($lockFilePath);
|
||||
|
||||
exit($exitCode);
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ use const DIRECTORY_SEPARATOR;
|
||||
use const LOCK_EX;
|
||||
use const LOCK_NB;
|
||||
use const LOCK_SH;
|
||||
use const LOCK_UN;
|
||||
use const SCANDIR_SORT_NONE;
|
||||
|
||||
final class Filesystem{
|
||||
@ -140,6 +141,7 @@ final class Filesystem{
|
||||
throw new \InvalidArgumentException("Invalid lock file path");
|
||||
}
|
||||
if(isset(self::$lockFileHandles[$lockFilePath])){
|
||||
flock(self::$lockFileHandles[$lockFilePath], LOCK_UN);
|
||||
fclose(self::$lockFileHandles[$lockFilePath]);
|
||||
unset(self::$lockFileHandles[$lockFilePath]);
|
||||
@unlink($lockFilePath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user