From 012c8a315036ae5e96d96c0f3a261604169afc0a Mon Sep 17 00:00:00 2001 From: Seb3thehacker <88462253+Seb3thehacker@users.noreply.github.com> Date: Thu, 24 Mar 2022 08:16:20 +0000 Subject: [PATCH] Support file locking --- backends/localfs/localfs.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/backends/localfs/localfs.go b/backends/localfs/localfs.go index 9a72891..bd68d20 100644 --- a/backends/localfs/localfs.go +++ b/backends/localfs/localfs.go @@ -2,7 +2,6 @@ package localfs import ( "encoding/json" - "errors" "io" "io/ioutil" "net/http" @@ -152,18 +151,6 @@ func (b LocalfsBackend) Unlock(filename string) (err error) { return } -func (b LocalfsBackend) CheckLock(filename string) (locked bool, err error) { - lockPath := path.Join(b.locksPath, filename) - - if _, err := os.Stat(lockPath); errors.Is(err, os.ErrNotExist) { - return false, nil - } else { - return true, nil - } - - return false, err -} - func (b LocalfsBackend) Put(key string, r io.Reader, expiry time.Time, deleteKey, accessKey string, srcIp string) (m backends.Metadata, err error) { filePath := path.Join(b.filesPath, key)