From 18f705850ed2d81a4e76eda34881b285842628c0 Mon Sep 17 00:00:00 2001 From: Cy Allen Scott Date: Fri, 22 Apr 2022 15:08:37 -0400 Subject: [PATCH] refactor: reverting changes no longer needed --- files/file.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/files/file.go b/files/file.go index b9daa8e3..8515c6aa 100644 --- a/files/file.go +++ b/files/file.go @@ -27,7 +27,6 @@ import ( type FileInfo struct { *Listing Fs afero.Fs `json:"-"` - Dir string `json:"dir"` Path string `json:"path"` Name string `json:"name"` Size int64 `json:"size"` @@ -106,10 +105,8 @@ func stat(opts FileOptions) (*FileInfo, error) { if err != nil { return nil, err } - dir, _ := filepath.Split(opts.Path) file = &FileInfo{ Fs: opts.Fs, - Dir: dir, Path: opts.Path, Name: info.Name(), ModTime: info.ModTime(), @@ -144,10 +141,8 @@ func stat(opts FileOptions) (*FileInfo, error) { return file, nil } - dir, _ := filepath.Split(opts.Path) file = &FileInfo{ Fs: opts.Fs, - Dir: dir, Path: opts.Path, Name: info.Name(), ModTime: info.ModTime(), @@ -222,8 +217,6 @@ func (i *FileInfo) Thumbnail() (*FileInfo, error) { path := ThumbnailPath(realPath) - dir, _ := filepath.Split(path) - info, err := os.Stat(path) if err != nil { @@ -232,7 +225,6 @@ func (i *FileInfo) Thumbnail() (*FileInfo, error) { file := &FileInfo{ Fs: i.Fs, - Dir: dir, Path: path, Name: info.Name(), ModTime: info.ModTime(),