commit: bad6ecfb31536dec0a7b88978c11c0b7f26ba3a9
parent: ecd3ce545d376f577b66e3361caad00565a6ec5b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 12 Dec 2019 00:51:04 +0100
Proper workdir support
Diffstat:
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/go-deblob.go b/go-deblob.go
@@ -116,19 +116,15 @@ func main() {
}
}
- dirinfo, err := os.Stat(workdir)
+ err = os.Chdir(workdir)
if err != nil {
- log.Printf("os.Stat(%s): %s\n", workdir, err)
- os.Exit(1)
- }
- if !dirinfo.IsDir() {
- fmt.Printf("Error: %s is not a directory\n", workdir)
+ log.Printf("os.Chdir(%s): %s\n", workdir, err)
os.Exit(1)
}
fmt.Printf(":: Checking for blobs, removed:\n")
- checkDir(workdir)
+ checkDir(".")
fmt.Printf(":: Done checking for blobs\n")
}