Former-commit-id: 7b068c22b37003acf5dd60806a828ed9f828fc95 [formerly 10918882c8f3150b57a5cd142e7443150caff282] [formerly be0e1f9cd900feead555280dbff11e024055cd7f [formerly b8fdb487d9]]
Former-commit-id: cf6f5b27bb327bfb00d01e249f8db457543407f6 [formerly e5e0ceee98ceadd4061f2443b6c4a53249e838a4]
Former-commit-id: 2187a74e21e29e8cf5b13bcca6724ced2aae47c9
This commit is contained in:
Henrique Dias 2017-11-14 07:23:08 +00:00
commit 372bd813d9
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++