This commit is contained in:
Benjamin Gaussorgues 2026-02-04 01:38:38 +00:00 committed by GitHub
commit 349740cc78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,9 @@ class FileSequence implements ISequence {
private function ensureWorkdirExists(): void {
if (is_dir($this->workDir)) {
if (!is_writable($this->workDir)) {
throw new \Exception('File sequence directory exists but is not writable');
}
return;
}
@ -104,6 +107,6 @@ class FileSequence implements ISequence {
}
private function getFilePath(int $fileId): string {
return $this->workDir . sprintf(self::LOCK_FILE_FORMAT, $fileId);
return $this->workDir . '/' . sprintf(self::LOCK_FILE_FORMAT, $fileId);
}
}

View file

@ -30,6 +30,5 @@ class FileSequenceTest extends ISequenceBase {
foreach (glob($lockDirectory . '/*') as $file) {
unlink($file);
}
rmdir($lockDirectory);
}
}