only lock if unlink is called for a file

This commit is contained in:
Bjoern Schiessle 2014-06-02 16:38:55 +02:00 committed by Thomas Müller
parent 2b30fb4862
commit 48eb0515e9
1 changed files with 3 additions and 1 deletions

View File

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