fix: 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>
This commit is contained in:
Dennis Verspuij 2024-06-20 23:53:38 +02:00 committed by skjnldsv
parent b964094ebf
commit 181aecad4c

View file

@ -117,6 +117,7 @@ class Local extends \OC\Files\Storage\Common {
}
$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) {