e-dard/flask-s3

create_all incorrectly handles paths in Windows

iansjk opened this issue · 0 comments

(Platform: Windows 10 running Python 2.7)

The offending method is _gather_files, line 177:
dirs = [(six.u(app.static_folder), app.static_url_path)]

The six.u method escapes strings which causes Windows path backslashes to break:

  • Original path: "C:\\Code\\test"
  • Result of six.u: "C:\\Code\test" (with a tab character, \t)

This causes create_all to warn that the path does not exist, even though it does (due to the malformed path).