Merge branch 'master' of https://github.com/hacdias/filemanager
Former-commit-id: 7b068c22b37003acf5dd60806a828ed9f828fc95 [formerly 10918882c8f3150b57a5cd142e7443150caff282] [formerly be0e1f9cd900feead555280dbff11e024055cd7f [formerly b8fdb487d9
]]
Former-commit-id: cf6f5b27bb327bfb00d01e249f8db457543407f6 [formerly e5e0ceee98ceadd4061f2443b6c4a53249e838a4]
Former-commit-id: 2187a74e21e29e8cf5b13bcca6724ced2aae47c9
pull/726/head
commit
372bd813d9
|
@ -1,6 +1,6 @@
|
|||
language: go
|
||||
|
||||
go: 1.8.3
|
||||
go: 1.x
|
||||
|
||||
env:
|
||||
- "PATH=/home/travis/gopath/bin:$PATH"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
10
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++
|
||||
|
|
Loading…
Reference in New Issue