From 7c99b9eaadbc286b05d0b301a6a68f9307f2850b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 4 Aug 2022 17:42:43 +0300 Subject: [PATCH] lib/backup/actions: rename removeLockFile -> removeRestoreLock to have consistent naming with createRestoreLock function --- lib/backup/actions/restore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/backup/actions/restore.go b/lib/backup/actions/restore.go index 127e6c6f4..82c9e7b5d 100644 --- a/lib/backup/actions/restore.go +++ b/lib/backup/actions/restore.go @@ -194,7 +194,7 @@ func (r *Restore) Run() error { logger.Infof("restored %d bytes from backup in %.3f seconds; deleted %d bytes; downloaded %d bytes", backupSize, time.Since(startTime).Seconds(), deleteSize, downloadSize) - return removeLockFile(r.Dst.Dir) + return removeRestoreLock(r.Dst.Dir) } type statWriter struct { @@ -217,7 +217,7 @@ func createRestoreLock(dstDir string) error { return f.Close() } -func removeLockFile(dstDir string) error { +func removeRestoreLock(dstDir string) error { lockF := path.Join(dstDir, "restore-in-progress") if err := os.Remove(lockF); err != nil { return fmt.Errorf("cannote remove restore lock file %q: %w", lockF, err)