only lock if unlink is called for a file
This commit is contained in:
parent
2b30fb4862
commit
48eb0515e9
|
@ -164,7 +164,9 @@ class LockingWrapper extends Wrapper {
|
||||||
|
|
||||||
public function unlink($path) {
|
public function unlink($path) {
|
||||||
try {
|
try {
|
||||||
$this->getLock($path, Lock::WRITE);
|
if (\OC\Files\Filesystem::is_file($path)) {
|
||||||
|
$this->getLock($path, Lock::WRITE);
|
||||||
|
}
|
||||||
$result = $this->storage->unlink($path);
|
$result = $this->storage->unlink($path);
|
||||||
}
|
}
|
||||||
catch(\Exception $originalException) {
|
catch(\Exception $originalException) {
|
||||||
|
|
Loading…
Reference in New Issue