X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=cleanup.go;h=b978baec1deb255456fa3d6d2936d58ec56e6fb1;hb=9d1ca78917c32c17686d7ea2ef01c6ebcc0f63d8;hp=26dbadce23b7540e6267a862acffd40176f4a628;hpb=fc065e1408aa2e452699d1bae1a56af9fcc69bec;p=goredo.git diff --git a/cleanup.go b/cleanup.go index 26dbadc..b978bae 100644 --- a/cleanup.go +++ b/cleanup.go @@ -24,7 +24,6 @@ import ( "log" "os" "path" - "path/filepath" "strings" ) @@ -45,10 +44,7 @@ func init() { } func redoDirClean(root, what string) error { - root, err := filepath.Abs(root) - if err != nil { - panic(err) - } + root = mustAbs(root) dir, err := os.Open(root) if err != nil { return ErrLine(err) @@ -103,10 +99,7 @@ func redoDirClean(root, what string) error { } func cleanupWalker(root, what string) error { - root, err := filepath.Abs(root) - if err != nil { - panic(err) - } + root = mustAbs(root) dir, err := os.Open(root) if err != nil { return ErrLine(err)