Skip to content

Commit

Permalink
Fix fswatch events regexp
Browse files Browse the repository at this point in the history
additional events might be in a line
  • Loading branch information
nsams authored and mariokemetinger committed Apr 26, 2016
1 parent bd6898b commit 7e74e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kwf/FileWatcher/Backend/Fswatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function _getCmd()

protected function _getEventFromLine($line)
{
if (!preg_match('#^(.*) ([^ ]*)(Created|Removed|Renamed|Updated),(IsFile|IsDir)$#', trim($line), $m)) {
if (!preg_match('#^(.*) ([^ ]*?)(Created|Removed|Renamed|Updated)(,.+)?,(IsFile|IsDir)$#', trim($line), $m)) {
$this->_logger->error("unknown event: $line");
return;
}
Expand Down

0 comments on commit 7e74e2b

Please sign in to comment.