diff --git a/cmd/omniflixhubd/cmd/root.go b/cmd/omniflixhubd/cmd/root.go index bf74b08..42492b9 100644 --- a/cmd/omniflixhubd/cmd/root.go +++ b/cmd/omniflixhubd/cmd/root.go @@ -4,6 +4,7 @@ import ( "errors" "io" "os" + "path/filepath" "github.com/cosmos/cosmos-sdk/baseapp" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -178,10 +179,7 @@ func addModuleInitFlags(startCmd *cobra.Command) { } func tempDir() string { - dir, err := os.MkdirTemp("", "omniflixhubtemp") - if err != nil { - dir = app.DefaultNodeHome - } + dir := filepath.Join(os.TempDir(), "."+app.Name+"-temp") defer os.RemoveAll(dir) return dir