bradfeehan / SublimePHPCoverage

A plugin for Sublime Text 2 and 3, which visualises PHP code coverage data in the editor.
MIT License
57 stars 10 forks source link

Normalize file paths before comparison (Update SublimePHPCoverage.py) #12

Closed uehondor closed 11 years ago

uehondor commented 11 years ago

The Bug:

On windows, the file path comparison returns false even when the files are exactly the same. I narrowed the issue down to mismatching / and \ characters in the file paths.

For instance, a simple string comparison on windows like this

"some/random/file" == "some/random\file" #returns false

As far as I know, *nix machines do not have this issue.

The Fix:

The paths are now normalised first before comparison.