pull/291/head
Henrique Dias 2017-11-14 07:23:08 +00:00
commit b8fdb487d9
4 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,6 @@
language: go
go: 1.8.3
go: 1.x
env:
- "PATH=/home/travis/gopath/bin:$PATH"

View File

@ -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

View File

@ -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'

10
file.go
View File

@ -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++