From 683f0fb5221837700485fd11737133bf97388c14 Mon Sep 17 00:00:00 2001 From: Frank Tackitt Date: Tue, 22 Jul 2014 10:40:18 -0700 Subject: [PATCH] Fix uploading assets on windows machines --- flask_s3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flask_s3.py b/flask_s3.py index 0c87362..c518347 100644 --- a/flask_s3.py +++ b/flask_s3.py @@ -114,9 +114,10 @@ def _write_files(app, static_url_loc, static_folder, files, bucket, ex_keys=None, hashes=None): """ Writes all the files inside a static folder to S3. """ new_hashes = [] + static_folder_rel = _path_to_relative_url(static_folder) for file_path in files: asset_loc = _path_to_relative_url(file_path) - key_name = _static_folder_path(static_url_loc, static_folder, + key_name = _static_folder_path(static_url_loc, static_folder_rel, asset_loc) msg = "Uploading %s to %s as %s" % (file_path, bucket, key_name) logger.debug(msg)