waterbutler icon indicating copy to clipboard operation
waterbutler copied to clipboard

os.path.join creates malformed URLs on Windows

Open BenediktHeinrichs opened this issue 5 years ago • 0 comments

We are currently trying to run waterbutler on Windows and on inspection of the registered routes, we stumbled upon the following line in app.py:

(os.path.join('/', api.PREFIX, pattern.lstrip('/')), handler)

This has a strange behavior on Windows, so that instead of a normal "/" it adds a "\", which makes the api v1 not useable on Windows.

One workaround we implemented was to just add those three strings manually using the following line:

('/' + api.PREFIX + '/' + pattern.lstrip('/'), handler)

BenediktHeinrichs avatar Apr 05 '19 13:04 BenediktHeinrichs