aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 881bf1a2126..20c0fd3ed1b 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -824,12 +824,12 @@ class View {
if ((Cache\Scanner::isPartialFile($path1) && !Cache\Scanner::isPartialFile($path2)) && $result !== false) {
// if it was a rename from a part file to a regular file it was a write and not a rename operation
$this->writeUpdate($storage2, $internalPath2);
- } else if ($result) {
+ } elseif ($result) {
if ($internalPath1 !== '') { // don't do a cache update for moved mounts
$this->renameUpdate($storage1, $storage2, $internalPath1, $internalPath2);
}
}
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
throw $e;
} finally {
$this->changeLock($path1, ILockingProvider::LOCK_SHARED, true);
@@ -853,7 +853,7 @@ class View {
}
}
}
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
throw $e;
} finally {
$this->unlockFile($path1, ILockingProvider::LOCK_SHARED, true);
@@ -895,7 +895,6 @@ class View {
$lockTypePath2 = ILockingProvider::LOCK_SHARED;
try {
-
$exists = $this->file_exists($path2);
if ($this->shouldEmitHooks()) {
\OC_Hook::emit(
@@ -946,7 +945,6 @@ class View {
);
$this->emit_file_hooks_post($exists, $path2);
}
-
}
} catch (\Exception $e) {
$this->unlockFile($path2, $lockTypePath2);
@@ -956,7 +954,6 @@ class View {
$this->unlockFile($path2, $lockTypePath2);
$this->unlockFile($path1, $lockTypePath1);
-
}
return $result;
}
@@ -1165,7 +1162,7 @@ class View {
} catch (\Exception $e) {
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else if (in_array('read', $hooks)) {
+ } elseif (in_array('read', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
throw $e;
@@ -1193,7 +1190,7 @@ class View {
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
if (in_array('write', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else if (in_array('read', $hooks)) {
+ } elseif (in_array('read', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
});
@@ -1340,7 +1337,7 @@ class View {
$scanner = $storage->getScanner($internalPath);
$scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW);
$data = $cache->get($internalPath);
- } else if (!Cache\Scanner::isPartialFile($internalPath) && $watcher->needsUpdate($internalPath, $data)) {
+ } elseif (!Cache\Scanner::isPartialFile($internalPath) && $watcher->needsUpdate($internalPath, $data)) {
$this->lockFile($relativePath, ILockingProvider::LOCK_SHARED);
$watcher->update($internalPath, $data);
$storage->getPropagator()->propagateChange($internalPath, time());