Merge branch 'master' of https://github.com/hacdias/filemanager
commit
b8fdb487d9
|
@ -1,6 +1,6 @@
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
go: 1.8.3
|
go: 1.x
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- "PATH=/home/travis/gopath/bin:$PATH"
|
- "PATH=/home/travis/gopath/bin:$PATH"
|
||||||
|
|
|
@ -13,6 +13,7 @@ RUN mv filemanager /go/bin/filemanager
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=0 /go/bin/filemanager /filemanager
|
COPY --from=0 /go/bin/filemanager /filemanager
|
||||||
|
|
||||||
|
VOLUME /tmp
|
||||||
VOLUME /srv
|
VOLUME /srv
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ import Router from 'vue-router'
|
||||||
import Login from '@/views/Login'
|
import Login from '@/views/Login'
|
||||||
import Layout from '@/views/Layout'
|
import Layout from '@/views/Layout'
|
||||||
import Files from '@/views/Files'
|
import Files from '@/views/Files'
|
||||||
import Users from '@/views/Settings/Users'
|
import Users from '@/views/settings/Users'
|
||||||
import User from '@/views/Settings/User'
|
import User from '@/views/settings/User'
|
||||||
import Settings from '@/views/Settings'
|
import Settings from '@/views/Settings'
|
||||||
import GlobalSettings from '@/views/settings/Global'
|
import GlobalSettings from '@/views/settings/Global'
|
||||||
import ProfileSettings from '@/views/settings/Profile'
|
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
|
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() {
|
if f.IsDir() {
|
||||||
name += "/"
|
name += "/"
|
||||||
dirCount++
|
dirCount++
|
||||||
|
|
Loading…
Reference in New Issue