mirror of
https://github.com/nextcloud/server.git
synced 2026-03-02 05:20:46 -05:00
only lock if unlink is called for a file
This commit is contained in:
parent
2b30fb4862
commit
48eb0515e9
1 changed files with 3 additions and 1 deletions
|
|
@ -164,7 +164,9 @@ class LockingWrapper extends Wrapper {
|
|||
|
||||
public function unlink($path) {
|
||||
try {
|
||||
$this->getLock($path, Lock::WRITE);
|
||||
if (\OC\Files\Filesystem::is_file($path)) {
|
||||
$this->getLock($path, Lock::WRITE);
|
||||
}
|
||||
$result = $this->storage->unlink($path);
|
||||
}
|
||||
catch(\Exception $originalException) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue