You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
Updates on auth and db
Former-commit-id: cdcfc50a4a7274482826520644019d54c37a7753 [formerly 376d2422063755c75d5b5c8e21bf8617ca3a9baf] [formerly ea860508c1603296e0439a583ca0573609be3511 [formerly 6312c60b2e]]
Former-commit-id: d64b8b836568b150853288a69f870662e92db1e0 [formerly b85b1a09bbf87c1b5f2af07659121ef51a74f05e]
Former-commit-id: ee164251a6143567da3f970e347ede0d6de1d350
This commit is contained in:
6
file.go
6
file.go
@@ -85,10 +85,10 @@ func getInfo(url *url.URL, c *FileManager, u *User) (*file, error) {
|
||||
i := &file{
|
||||
URL: c.RootURL() + "/files" + url.Path,
|
||||
VirtualPath: url.Path,
|
||||
Path: filepath.Join(u.Scope, url.Path),
|
||||
Path: filepath.Join(string(u.FileSystem), url.Path),
|
||||
}
|
||||
|
||||
info, err := u.fileSystem.Stat(context.TODO(), url.Path)
|
||||
info, err := u.FileSystem.Stat(context.TODO(), url.Path)
|
||||
if err != nil {
|
||||
return i, err
|
||||
}
|
||||
@@ -106,7 +106,7 @@ func getInfo(url *url.URL, c *FileManager, u *User) (*file, error) {
|
||||
func (i *file) getListing(c *requestContext, r *http.Request) error {
|
||||
// Gets the directory information using the Virtual File System of
|
||||
// the user configuration.
|
||||
f, err := c.us.fileSystem.OpenFile(context.TODO(), c.fi.VirtualPath, os.O_RDONLY, 0)
|
||||
f, err := c.us.FileSystem.OpenFile(context.TODO(), c.fi.VirtualPath, os.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user