|
@@ -1766,8 +1766,8 @@ func system_fs_listRoot(w http.ResponseWriter, r *http.Request) {
|
|
|
IsDir bool
|
|
|
}
|
|
|
//List the root media folders under user:/
|
|
|
- var filesInUserRoot []fileObject
|
|
|
- filesInRoot, _ := filepath.Glob(*root_directory + "users/" + username + "/*")
|
|
|
+ filesInUserRoot := []fileObject{}
|
|
|
+ filesInRoot, _ := filepath.Glob(filepath.ToSlash(filepath.Clean(*root_directory)) + "/users/" + username + "/*")
|
|
|
for _, file := range filesInRoot {
|
|
|
thisFile := new(fileObject)
|
|
|
thisFile.Filename = filepath.Base(file)
|