Skip to content

Commit a275497

Browse files
Release directory iterator and thereby its potential directory lock prior 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>
1 parent 441dfd6 commit a275497

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/private/Files/Storage/Local.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function rmdir($path) {
117117
}
118118
$it->next();
119119
}
120+
unset($it); // Release iterator and thereby its potential directory lock (e.g. in case of VirtualBox shared folders)
120121
clearstatcache(true, $this->getSourcePath($path));
121122
return rmdir($this->getSourcePath($path));
122123
} catch (\UnexpectedValueException $e) {

0 commit comments

Comments
 (0)