Software /
code /
prosody
Changeset
6873:6dae43341b44
mod_http_files: Translate forward slashes to local directory separators
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Sep 2015 19:35:56 +0200 |
parents | 6872:eb28067faadf |
children | 6887:da38775bda82 6902:d2d7ad2563f9 |
files | plugins/mod_http_files.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;