Skip to content

Commit

Permalink
Bugfix: ignored_files & ignored_folders patterns needs to match the f…
Browse files Browse the repository at this point in the history
…ull filename/path
  • Loading branch information
gboudreau committed Jan 16, 2014
1 parent 5a369bb commit 6e97b9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions greyhole
Original file line number Diff line number Diff line change
Expand Up @@ -1682,15 +1682,15 @@ function should_ignore_file($share, $full_path) {
list($path, $filename) = explode_full_path($full_path);

foreach ($ignored_files as $ignored_file_re) {
if (preg_match(';' . $ignored_file_re . ';', $filename)) {
if (preg_match(';^' . $ignored_file_re . '$;', $filename)) {
gh_log(INFO, "Ignoring task because it matches the following ignored_files pattern: $ignored_file_re");
return TRUE;
}
}
foreach ($ignored_folders as $ignored_folder_re) {
$p = clean_dir("$share/$path");
gh_log(DEBUG, "Looking for ignore match between $p and $ignored_folder_re");
if (preg_match(';' . $ignored_folder_re . ';', $p)) {
if (preg_match(';^' . $ignored_folder_re . '$;', $p)) {
gh_log(INFO, "Ignoring task because it matches the following ignored_folders pattern: $ignored_folder_re");
return TRUE;
}
Expand Down

0 comments on commit 6e97b9a

Please sign in to comment.