Skip to content

Commit

Permalink
fix: Release directory iterator and thereby its potential directory l…
Browse files Browse the repository at this point in the history
…ock prior to deleting a directory, to avoid e.g. "Text file busy" error with VirtualBox shared folder storage

Signed-off-by: Dennis Verspuij <[email protected]>
  • Loading branch information
dennisverspuij authored and skjnldsv committed Jul 27, 2024
1 parent b964094 commit 181aeca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function rmdir($path) {
}
$it->next();
}
unset($it); // Release iterator and thereby its potential directory lock (e.g. in case of VirtualBox shared folders)
clearstatcache(true, $this->getSourcePath($path));
return rmdir($this->getSourcePath($path));
} catch (\UnexpectedValueException $e) {
Expand Down

0 comments on commit 181aeca

Please sign in to comment.