Merge pull request #58055 from nextcloud/backport/57921/stable33

[stable33] fix(snowflakes): create file lock files into lock directory
This commit is contained in:
Andy Scherzinger 2026-02-04 17:35:36 +01:00 committed by GitHub
commit cdbcfea1ff
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);
}
}