Update cmd/geth/dbcmd.go

Co-authored-by: Martin HS <martin@swende.se>
This commit is contained in:
rjl493456442 2023-12-21 21:57:17 +08:00 committed by GitHub
parent f2ccd41c37
commit 98247fe4ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,7 +219,7 @@ func removeDB(ctx *cli.Context) error {
return nil return nil
} }
// removeFolder deletes all the files inside the folder unexcept the subfolders. // removeFolder deletes all files (not folders) inside the directory 'dir' (but not files in subfolders).
func removeFolder(dir string) { func removeFolder(dir string) {
filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
// If we're at the top level folder, recurse into // If we're at the top level folder, recurse into