import (
"../config"
- "container/vector"
"errors"
"os"
"path"
return err == nil && checkInJail(path), path
}
-func List(the_path string) (files vector.StringVector, err error) {
+func List(the_path string) (files []string, err error) {
full_path := canonicalizePath(the_path)
if !checkInJail(full_path) {
return nil, errors.New("Path outside of jail")
if !gConfig.IncludeDotfiles && name[0] == '.' {
continue
}
- files.Push(name)
+ files = append(files, name)
}
return files, nil
}