mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-18 00:45:47 +00:00
fix: normalize recursive listing paths to forward slashes (#6003)
This commit is contained in:
parent
43a404ca69
commit
2472fbcd30
3 changed files with 56 additions and 4 deletions
|
|
@ -424,7 +424,10 @@ var resourceGetRecursiveHandler = withUser(func(w http.ResponseWriter, r *http.R
|
|||
}
|
||||
|
||||
entries = append(entries, RecursiveEntry{
|
||||
Path: fPath,
|
||||
// afero.Walk joins paths with the OS separator, so on Windows fPath
|
||||
// uses backslashes. The web API contract is forward slashes, so
|
||||
// normalize it here (mirrors search/search.go).
|
||||
Path: filepath.ToSlash(fPath),
|
||||
Name: info.Name(),
|
||||
Size: info.Size(),
|
||||
ModTime: info.ModTime(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue