Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalizes path for git and git submodules
`_git_ls_files()` returns file paths with forward slashes. For files in submodules, add_prefix_to_each() is called to prefix all the submodule files with the relative path to the project root. On Windows, the relative path contains backslashes. Since not every file in the project is in a submodule, the combined list of files ended up with some files that use forward slashes and others that use backslashes. For project structures where the submodules share a path segment with the project source, this caused `add_directories()` to create duplicate directory entries in the list of files. The duplicate entries would result in a traceback with a WindowsError when `os.mkdir()` was called to create the same directory a second time. See mgedmin#61 for more details. This commit replaces the backslashes with forward slashes in the relative path, eliminating the duplicate directory entries.
- Loading branch information