From 650338c4befec3ec6ade94be7db3b7e6bab2f0d8 Mon Sep 17 00:00:00 2001 From: Marcos Antonio Maceo <35319980+stdevMac@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:47:28 +0400 Subject: [PATCH] fix: revert base path (#470) --- configs/messages.go | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/configs/messages.go b/configs/messages.go index 615458c80..d4b9be4f6 100644 --- a/configs/messages.go +++ b/configs/messages.go @@ -17,11 +17,8 @@ package configs import ( "fmt" + "os" "path/filepath" - - "github.com/NethermindEth/sedge/internal/locker" - "github.com/NethermindEth/sedge/internal/monitoring/data" - "github.com/spf13/afero" ) // All the strings that are needed for debugging and info logging, and constant strings. @@ -123,17 +120,10 @@ Happy Staking! var DefaultAbsSedgeDataPath string func init() { - // Set filesystem - // fs := afero.NewMemMapFs() // Uncomment this line if you want to use the in-memory filesystem - // fs := afero.NewBasePathFs(afero.NewOsFs(), "/tmp") // Uncomment this line if you want to use the real filesystem with a base path - fs := afero.NewOsFs() // Uncomment this line if you want to use the real filesystem - - // Set locker - locker := locker.NewFLock() - dataDir, err := data.NewDataDirDefault(fs, locker) + cwd, err := os.Getwd() if err != nil { + // notest fmt.Println(err) } - - DefaultAbsSedgeDataPath = filepath.Join(dataDir.Path(), DefaultSedgeDataFolderName) + DefaultAbsSedgeDataPath = filepath.Join(cwd, DefaultSedgeDataFolderName) }