mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Merge e15b429aea into 7a0093c163
This commit is contained in:
commit
349740cc78
2 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,5 @@ class FileSequenceTest extends ISequenceBase {
|
|||
foreach (glob($lockDirectory . '/*') as $file) {
|
||||
unlink($file);
|
||||
}
|
||||
rmdir($lockDirectory);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue