forked from cerc-io/plugeth
all: use common.FileExist for checking file existence (#24748)
This commit is contained in:
@@ -497,7 +497,7 @@ Check the command description "geth snapshot prune-state --help" for more detail
|
||||
`
|
||||
|
||||
func deleteCleanTrieCache(path string) {
|
||||
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||
if !common.FileExist(path) {
|
||||
log.Warn(warningLog)
|
||||
return
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ func newTxJournal(path string) *txJournal {
|
||||
// the specified pool.
|
||||
func (journal *txJournal) load(add func([]*types.Transaction) []error) error {
|
||||
// Skip the parsing if the journal file doesn't exist at all
|
||||
if _, err := os.Stat(journal.path); os.IsNotExist(err) {
|
||||
if !common.FileExist(journal.path) {
|
||||
return nil
|
||||
}
|
||||
// Open the journal for loading any past transactions
|
||||
|
||||
Reference in New Issue
Block a user