From aec160fe01fd719ee16af237b1392b476a195862 Mon Sep 17 00:00:00 2001 From: MAERYO Date: Wed, 15 Nov 2023 23:32:55 +0900 Subject: [PATCH] chore: change filepath variable to camel case --- files/file.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/file.go b/files/file.go index 4c0eb0d3..ed0012e7 100644 --- a/files/file.go +++ b/files/file.go @@ -6,7 +6,6 @@ import ( "crypto/sha256" "crypto/sha512" "encoding/hex" - "github.com/spf13/afero" "hash" "image" "io" @@ -19,6 +18,8 @@ import ( "strings" "time" + "github.com/spf13/afero" + "github.com/filebrowser/filebrowser/v2/errors" "github.com/filebrowser/filebrowser/v2/rules" ) @@ -276,8 +277,7 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error { return nil } -func calculateImageResolution(fs afero.Fs, filepath string) (*ImageResolution, error) { - file, err := fs.Open(filepath) +func calculateImageResolution(fs afero.Fs, filePath string) (*ImageResolution, error) { if err != nil { return nil, err }