From 18d7bcf83dd7512a0f224bdeeb53678ec0b5e8b9 Mon Sep 17 00:00:00 2001 From: Alex Russell Date: Mon, 9 Sep 2013 17:13:08 +0100 Subject: [PATCH] Implemented a more encompassing hidden-files ignore rule. Therefore, removed dotted (hidden) files form ignored array. --- libs/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/functions.php b/libs/functions.php index fca70bd..b3c16f1 100644 --- a/libs/functions.php +++ b/libs/functions.php @@ -223,7 +223,7 @@ function get_ignored() { // TODO: Add support for wildcards // TODO: Add support for specific paths, i.e. /Publish/Somefile.md vs. /Don't_Publish/Somefile.md $options = get_options(); - $default_ignored_files = array('config.json', 'cgi-bin', '.', '..', '.DS_Store', 'Thumbs.db', '.Trashes', '.htaccess'); + $default_ignored_files = array('config.json', 'cgi-bin', 'Thumbs.db'); $default_ignored_folders = array(); // To allow for easy addition of default folders if found necessary in the future $user_ignored_files = array(); $user_ignored_folders = array(); @@ -268,7 +268,7 @@ function get_tree($path = '.', $clean_path = '', $title = '', $first = true){ foreach($paths as $file) { // Check that this file or folder is not to be ignored - if(!in_array($file, $ignore)) { + if(!in_array($file, $ignore) && $file[0] !== '.') { $full_path = "$path/$file"; $clean_sort = clean_sort($file);