Fix path concatenation to prevent leading double slash
Review Request #6962 — Created Feb. 18, 2015 and submitted
In
SVNClient.convert_to_absolute_paths()
when concatenating paths when the --repository-url option is specified, it was possible to end up with a leading double slash whenrepository_info.base_path
was '/'. Switch toposixpath.join()
to correctly concatenate paths for all cases, with platform independent Unix-style slashes.
Tested on both Linux and Windows. Tested where base_path = '/': Old output: //file.txt New output: /file.txt Tested where base_path = '/foo': Old output: /foo/file.txt New output: /foo/file.txt
Description | From | Last Updated |
---|---|---|
If running on a windows system, does this do the wrong thing and join with '\'? |
david |
- Description:
-
~ In
SVNClient.convert_to_absolute_paths()
when concatenating paths when the --repository-url option is specified, it was possible to end up with a leading double slash whenrepository_info.base_path
was '/'. Switch toos.path.join()
to correctly concatenate paths for all cases.~ In
SVNClient.convert_to_absolute_paths()
when concatenating paths when the --repository-url option is specified, it was possible to end up with a leading double slash whenrepository_info.base_path
was '/'. Switch toposixpath.join()
to correctly concatenate paths for all cases, with platform independent Unix-style slashes. - Testing Done:
-
+ Tested on both Linux and Windows.
+ Tested where base_path = '/':
Old output: //file.txt New output: /file.txt Tested where base_path = '/foo':
Old output: /foo/file.txt New output: /foo/file.txt - Commit:
-
528b852139dc22be1bf7534be10aed528baed6772fdeb88c847e3f5f8c4deb18a44d8d1005117ac3
- Diff:
-
Revision 2 (+2 -1)