Skip to content
Snippets Groups Projects
Commit ac7443e4 authored by Florent Gluck's avatar Florent Gluck
Browse files

server: support links to template directories

parent 8e3cd73e
Branches
No related tags found
No related merge requests found
...@@ -114,7 +114,7 @@ func GetSubDirs(dir string) ([]string, error) { ...@@ -114,7 +114,7 @@ func GetSubDirs(dir string) ([]string, error) {
} }
// Retrieves all files entries in the directory (0 = all files in the directory). // Retrieves all files entries in the directory (0 = all files in the directory).
files, err := currentDir.Readdir(0) files, err := currentDir.ReadDir(0)
if err != nil { if err != nil {
currentDir.Close() currentDir.Close()
return nil, err return nil, err
...@@ -124,7 +124,8 @@ func GetSubDirs(dir string) ([]string, error) { ...@@ -124,7 +124,8 @@ func GetSubDirs(dir string) ([]string, error) {
// Loop over file entries // Loop over file entries
for _, f := range files { for _, f := range files {
if f.IsDir() { info, _ := f.Info()
if f.IsDir() || info.Mode()&os.ModeSymlink != 0 {
subDirs = append(subDirs, filepath.Join(dir, f.Name())) subDirs = append(subDirs, filepath.Join(dir, f.Name()))
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment