diff --git a/.travis.yml b/.travis.yml index 8d705c85..7092fe76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go -go: 1.8.3 +go: 1.x env: - "PATH=/home/travis/gopath/bin:$PATH" diff --git a/Dockerfile b/Dockerfile index d5d3b8e7..e5cb7f2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN mv filemanager /go/bin/filemanager FROM scratch COPY --from=0 /go/bin/filemanager /filemanager +VOLUME /tmp VOLUME /srv EXPOSE 80 diff --git a/assets/src/router/index.js b/assets/src/router/index.js index 39d387d3..58ca1d87 100644 --- a/assets/src/router/index.js +++ b/assets/src/router/index.js @@ -3,8 +3,8 @@ import Router from 'vue-router' import Login from '@/views/Login' import Layout from '@/views/Layout' import Files from '@/views/Files' -import Users from '@/views/Settings/Users' -import User from '@/views/Settings/User' +import Users from '@/views/settings/Users' +import User from '@/views/settings/User' import Settings from '@/views/Settings' import GlobalSettings from '@/views/settings/Global' import ProfileSettings from '@/views/settings/Profile' diff --git a/file.go b/file.go index 6c217b10..fa98fed1 100644 --- a/file.go +++ b/file.go @@ -133,6 +133,16 @@ func (i *File) GetListing(u *User, r *http.Request) error { continue } + if strings.HasPrefix(f.Mode().String(), "L") { + // It's a symbolic link + // The FileInfo from Readdir treats symbolic link as a file only. + info, err := os.Stat(f.Name()) + if err != nil { + return err + } + f = info + } + if f.IsDir() { name += "/" dirCount++