Make sure we create static entried for nginx
This PR ensure that everytime we invoke parse_static_data we get the
full list of static files and directory from app.yaml, even if we ask to
not copy the files into place.
@@ -1002,8 +1002,7 @@ module HelperFunctions
handler["expiration"] = expires_duration(handler["expiration"]) || default_expiration
- next unless copy_files
-
+ if copy_files
cache_static_dir_path = File.join(cache_path,handler["static_dir"])
FileUtils.mkdir_p cache_static_dir_path
@@ -1013,6 +1012,7 @@ module HelperFunctions
filenames.delete_if { |f| File.expand_path(f).match(skip_files_regex) }
FileUtils.cp_r filenames, cache_static_dir_path
+ end
elsif handler["static_files"]
# This is for bug https://bugs.launchpad.net/appscale/+bug/800539
# this is a temp fix
@@ -1025,8 +1025,7 @@ module HelperFunctions
handler["expiration"] = expires_duration(handler["expiration"]) || default_expiration
- next unless copy_files
-
+ if copy_files
upload_regex = Regexp.new(handler["upload"])
filenames = Dir.glob(File.join(untar_dir,"**","*"))
@@ -1046,6 +1045,7 @@ module HelperFunctions
FileUtils.cp_r filename, File.join(file_cache_path,File.basename(filename))
end
end
+ end
handler
end
