Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove lstrip & os.sep on targetpath & pathpattern
For targetpath: we don't want to support corner cases such as file paths starting with separator. Why this case should be threated specially than any other case where you have multiple "/" for example "foo//bar/tar.gz"? For pathpattern: it's recommended that the separator in the pathpattern should be "/": see https://theupdateframework.github.io/specification/latest/#targetpath I believe it could lead to issues for a client implementation if it supports arbitrary separators - every implementation needs to choose one and stick with it. Then, if we decide that "/" is our separator using lstrip on "os.sep" is wrong, because the os separator from the server could be different that the one used in the client. Because of the above arguments, it makes sense to just remove lstrip on os separators. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
- Loading branch information