diff options
author | Dennis Verspuij <6680484+dennisverspuij@users.noreply.github.com> | 2024-06-20 23:53:38 +0200 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-07-27 16:37:16 +0200 |
commit | 181aecad4c4c1ab62a5e3e5476cb8cdbe530bbee (patch) | |
tree | 4b195b35ab5da29bf669176b4bf0b8a3ec280a26 /lib | |
parent | b964094ebf83fe736658064f84b90b018e7537fb (diff) | |
download | nextcloud-server-181aecad4c4c1ab62a5e3e5476cb8cdbe530bbee.tar.gz nextcloud-server-181aecad4c4c1ab62a5e3e5476cb8cdbe530bbee.zip |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Local.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index ac3696118f7..a65d60bf278 100644 --- a/lib/private/Files/Storage/Local.php +++ b/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) { |