Skip to content

Commit 9c2ef72

Browse files
committed
Debug
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
1 parent d17fb28 commit 9c2ef72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/Snowflake/FileSequence.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public function isAvailable(): bool {
6060
public function nextId(int $serverId, int $seconds, int $milliseconds): int {
6161
// Open lock file
6262
$filePath = $this->getFilePath($milliseconds % self::NB_FILES);
63+
if (is_file($filePath)) {
64+
echo 'Log file exists';
65+
var_dump($filePath, decoct(fileperms($filePath)), fileowner($filePath));
66+
}
6367
$fp = fopen($filePath, 'c+');
6468
if ($fp === false) {
6569
throw new \Exception('Unable to open sequence ID file: ' . $filePath);

0 commit comments

Comments
 (0)