Skip to content

Commit

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

Signed-off-by: Dennis Verspuij <6680484+dennisverspuij@users.noreply.github.com>
  • Loading branch information
dennisverspuij authored and skjnldsv committed Jul 27, 2024
1 parent 5639d99 commit e70fcf7
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 e70fcf7

Please sign in to comment.