summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schönebeck <aschoenebeck@web.de>2013-03-15 12:11:42 +0100
committerAndreas Schönebeck <aschoenebeck@web.de>2013-03-15 12:11:42 +0100
commit387be374270dc1ac3669325fee60d35889a85b6e (patch)
treee54aedfd622b32e136eadfebd13f44ffa2bbcada /lib
parent23fe98a562e9a4e319a8d46d147364f2b3c7c490 (diff)
downloadnextcloud-server-387be374270dc1ac3669325fee60d35889a85b6e.tar.gz
nextcloud-server-387be374270dc1ac3669325fee60d35889a85b6e.zip
Filter display of blacklisted files
Blacklisted files like ".htaccess" and ".git" should not only be blacklisted for upload and rename, but they should also not be displayed in the directory listings. I needed this personally to hide ".git" folders in shared folders. Its also a simple implementation of feature requests like http://forum.owncloud.org/viewtopic.php?f=4&t=3279 and http://forum.owncloud.org/viewtopic.php?f=3&t=5708
Diffstat (limited to 'lib')
-rw-r--r--lib/files/cache/scanner.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 88f208547f6..f285f3bed11 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -151,6 +151,7 @@ class Scanner {
private function isIgnoredFile($file) {
if ($file === '.' || $file === '..'
|| pathinfo($file, PATHINFO_EXTENSION) === 'part'
+ || \OC\Files\Filesystem::isFileBlacklisted($file)
) {
return true;
}