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>
pull/46027/head
Dennis Verspuij 2 years ago committed by skjnldsv
parent b964094ebf
commit 181aecad4c
  1. 1
      lib/private/Files/Storage/Local.php

@ -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) {

Loading…
Cancel
Save