]> Cypherpunks.ru repositories - goredo.git/blobdiff - cleanup.go
Temporary targets can be $3
[goredo.git] / cleanup.go
index 06e6223195262c0c44be59ce924d4e89e2c0c0b9..e00e3ff299842929f37ea8a5129abe82d36b68ea 100644 (file)
@@ -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)
                                }