mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
dir.Recreate() (#581)
This commit is contained in:
parent
8ed848acbc
commit
6289ca7519
@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
@ -74,9 +73,8 @@ func Exist(path string) bool {
|
||||
}
|
||||
|
||||
func Recreate(dir string) {
|
||||
aggDir := path.Join(dir, "agg22")
|
||||
if Exist(aggDir) {
|
||||
_ = os.RemoveAll(aggDir)
|
||||
if Exist(dir) {
|
||||
_ = os.RemoveAll(dir)
|
||||
}
|
||||
MustExist(aggDir)
|
||||
MustExist(dir)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user