1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: merge with filepath

This commit is contained in:
yuyi
2020-03-08 05:26:26 +08:00
committed by GitHub
parent 5e541e1f11
commit 783dee1f48
57 changed files with 249 additions and 361 deletions

View File

@ -10,7 +10,6 @@ import (
net.http
net.urllib
strings
filepath
)
pub const (
@ -331,7 +330,7 @@ fn (ctx mut Context) scan_static_directory(directory_path, mount_path string) {
if os.is_dir(file) {
ctx.scan_static_directory(directory_path + '/' + file, mount_path + '/' + file)
} else if file.contains('.') && ! file.starts_with('.') && ! file.ends_with('.') {
ext := filepath.ext(file)
ext := os.ext(file)
// Rudimentary guard against adding files not in mime_types.
// Use serve_static directly to add non-standard mime types.