X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=blobdiff_plain;f=cleanup.go;h=e00e3ff299842929f37ea8a5129abe82d36b68ea;hp=06e6223195262c0c44be59ce924d4e89e2c0c0b9;hb=0d0e69d21056fe2c199beb7e7ce82572ae688825;hpb=a57de8f95c4e9d7998f3c777bd58eca8f9415f37 diff --git a/cleanup.go b/cleanup.go index 06e6223..e00e3ff 100644 --- a/cleanup.go +++ b/cleanup.go @@ -122,6 +122,12 @@ func cleanupWalker(root, what string) error { } else { err = redoDirClean(pth, what) } + } else if (what == CleanupTmp || what == CleanupFull) && + strings.HasPrefix(fi.Name(), TmpPrefix) { + fmt.Println(pthRel) + if !*DryRun { + err = os.RemoveAll(pth) + } } else { err = cleanupWalker(pth, what) }