Skip to content

Commit 4d50ac7

Browse files
authored
Merge pull request #10 from omnisend/update-exclusions
Exclude robot.txt file and fix comparison in is_excluded
2 parents 228206f + f48c772 commit 4d50ac7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/class-stl-file-comparer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class STL_File_Comparer {
6969
'wp-content/upgrade/',
7070
'wp-content/uploads/wp-staging/',
7171
'.htaccess',
72+
'robots.txt',
7273
'.DS_Store',
7374
'error_log',
7475
'php_errorlog',
@@ -536,7 +537,7 @@ private function is_excluded( $file ) {
536537

537538
// Check custom exclusions
538539
foreach ( $this->exclusions as $exclusion ) {
539-
if ( 0 === strpos( $file, $exclusion ) || fnmatch( $exclusion, $file ) ) {
540+
if ( false !== strpos( $file, $exclusion ) || fnmatch( $exclusion, $file ) ) {
540541
return true;
541542
}
542543
}

0 commit comments

Comments
 (0)