Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of different path variants on Windows #3781

Merged
merged 2 commits into from
Mar 22, 2017

Commits on Mar 21, 2017

  1. Improve handling of different path variants on Windows

    If forward slashes were used on Windows the glob was not matching on startup which lead to the issue that data was resent. This is solved in 5.3 by using path.Abs for all paths which also includes Clean. To make sure Path and Glob are always clean, Cleanup was added to the MatchFile part. This makes sure in case old data / incorrect data is loaded, the comparison will still work. More tests were added for windows to verify change.
    
    Before this change, option 1 below did not work.
    
    ```
    "F:/wwwLogs/flights-wsapi/WebServicesWebApi.log"
    "F:\\wwwLogs\\flights-wsapi\\WebServicesWebApi.log"
    'F:\wwwLogs\flights-wsapi\WebServicesWebApi.log'
    ```
    
    Based on https://discuss.elastic.co/t/duplicate-events-with-filebeat-on-windows-on-service-restart/78743/10
    ruflin committed Mar 21, 2017
    Configuration menu
    Copy the full SHA
    ce72b17 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    78378a4 View commit details
    Browse the repository at this point in the history