Skip to content

Commit

Permalink
Use "a" mode due to Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 8, 2024
1 parent 0dc7baf commit b431ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileMutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function acquire(?Cancellation $cancellation = null): Lock
// so set an asynchronous timer and try again.
for ($attempt = 0; true; ++$attempt) {
try {
$file = $this->filesystem->openFile($this->fileName, 'c');
$file = $this->filesystem->openFile($this->fileName, 'a');
if ($file->lock(LockMode::Exclusive)) {
return new Lock(fn () => $this->release($file));
}
Expand Down

0 comments on commit b431ee1

Please sign in to comment.