JohnstonCode / svn-scm

SVN support for VS Code
MIT License
208 stars 87 forks source link

ignoreRepositories option uses incorrect comparison #1559

Closed Zevensoft closed 8 months ago

Zevensoft commented 2 years ago

Issue

Paths listed in ignoreRepositories will fail to match if the string is different even if the path is the same. This is caused by failing to normalise the path correctly.

Steps to Reproduce

  1. Have a project setup like so: /project /project/external1 /project/external1/external2
  2. Set the ignoredRepositories like so: "/project/external1", "/project/external1/external2"
  3. You will now see external1 remains as the second external resulted in a "/project/external1/" path which wont get ignored.

Solution

normalizePath() needs to account for the final slash at the end of the path.