aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/view.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-05-10 12:00:13 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-05-10 12:00:13 +0200
commitc3b0d3d38cb2cfe1501a28081dde34dbec2d2621 (patch)
treeea17e6535ed31bcd91ba704406c097076ebf973b /lib/files/view.php
parentc112ac440822c354818e3b904194c957b580b608 (diff)
downloadnextcloud-server-c3b0d3d38cb2cfe1501a28081dde34dbec2d2621.tar.gz
nextcloud-server-c3b0d3d38cb2cfe1501a28081dde34dbec2d2621.zip
rename isIgnoredFile to isPartialFile, remove check of blacklisted files in isPartialFile, correct usage of isPartialFile and isFileBlacklisted
Diffstat (limited to 'lib/files/view.php')
-rw-r--r--lib/files/view.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/files/view.php b/lib/files/view.php
index f89b7f66ffd..35053e0729c 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -263,12 +263,13 @@ class View {
if (is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
if (\OC_FileProxy::runPreProxies('file_put_contents', $absolutePath, $data)
- && Filesystem::isValidPath($path)
+ and Filesystem::isValidPath($path)
+ and ! Filesystem::isFileBlacklisted($path)
) {
$path = $this->getRelativePath($absolutePath);
$exists = $this->file_exists($path);
$run = true;
- if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) {
+ if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isPartialFile($path)) {
if (!$exists) {
\OC_Hook::emit(
Filesystem::CLASSNAME,
@@ -296,7 +297,7 @@ class View {
list ($count, $result) = \OC_Helper::streamCopy($data, $target);
fclose($target);
fclose($data);
- if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) {
+ if ($this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isPartialFile($path)) {
if (!$exists) {
\OC_Hook::emit(
Filesystem::CLASSNAME,
@@ -340,6 +341,7 @@ class View {
\OC_FileProxy::runPreProxies('rename', $absolutePath1, $absolutePath2)
and Filesystem::isValidPath($path2)
and Filesystem::isValidPath($path1)
+ and ! Filesystem::isFileBlacklisted($path2)
) {
$path1 = $this->getRelativePath($absolutePath1);
$path2 = $this->getRelativePath($absolutePath2);
@@ -404,6 +406,7 @@ class View {
\OC_FileProxy::runPreProxies('copy', $absolutePath1, $absolutePath2)
and Filesystem::isValidPath($path2)
and Filesystem::isValidPath($path1)
+ and ! Filesystem::isFileBlacklisted($path2)
) {
$path1 = $this->getRelativePath($absolutePath1);
$path2 = $this->getRelativePath($absolutePath2);
@@ -606,7 +609,10 @@ class View {
private function basicOperation($operation, $path, $hooks = array(), $extraParam = null) {
$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
- if (\OC_FileProxy::runPreProxies($operation, $absolutePath, $extraParam) and Filesystem::isValidPath($path)) {
+ if (\OC_FileProxy::runPreProxies($operation, $absolutePath, $extraParam)
+ and Filesystem::isValidPath($path)
+ and ! Filesystem::isFileBlacklisted($path)
+ ) {
$path = $this->getRelativePath($absolutePath);
if ($path == null) {
return false;
@@ -635,7 +641,7 @@ class View {
private function runHooks($hooks, $path, $post = false) {
$prefix = ($post) ? 'post_' : '';
$run = true;
- if (Filesystem::$loaded and $this->fakeRoot == Filesystem::getRoot() && !Cache\Scanner::isIgnoredFile($path)) {
+ if (Filesystem::$loaded and $this->fakeRoot == Filesystem::getRoot()) {
foreach ($hooks as $hook) {
if ($hook != 'read') {
\OC_Hook::emit(