# HG changeset patch # User Kim Alvefur # Date 1443288956 -7200 # Node ID 6dae43341b44033a96104eff22e25e7bb9edcfe6 # Parent eb28067faadf57c9a584d466c4b3e80005e96d7c mod_http_files: Translate forward slashes to local directory separators diff -r eb28067faadf -r 6dae43341b44 plugins/mod_http_files.lua --- a/plugins/mod_http_files.lua Sat Sep 26 19:34:58 2015 +0200 +++ b/plugins/mod_http_files.lua Sat Sep 26 19:35:56 2015 +0200 @@ -61,7 +61,7 @@ local function serve_file(event, path) local request, response = event.request, event.response; local orig_path = request.path; - local full_path = base_path .. (path and "/"..path or ""); + local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep); local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows if not attr then return 404;