]> Cypherpunks.ru repositories - goredo.git/blobdiff - do.go
Cache file existence state
[goredo.git] / do.go
diff --git a/do.go b/do.go
index fd3bde00f75440c902a02d58e239514c00c9f701..4fbb6c9050d6289704f76f871cf0493ff1df63b6 100644 (file)
--- a/do.go
+++ b/do.go
@@ -34,7 +34,7 @@ const (
 var TopDir string
 
 func existsDo(fdDep *os.File, cwd, pth string) (bool, error) {
-       if _, err := os.Stat(path.Join(cwd, pth)); err == nil {
+       if FileExists(path.Join(cwd, pth)) {
                return true, nil
        }
        return false, ifcreate(fdDep, pth)
@@ -89,7 +89,7 @@ func findDo(fdDep *os.File, cwd, tgt string) (string, int, error) {
                if dirAbs == TopDir {
                        break
                }
-               if _, err = os.Stat(path.Join(dirAbs, RedoDir, TopFile)); err == nil {
+               if FileExists(path.Join(dirAbs, RedoDir, TopFile)) {
                        break
                }
                if dirAbs == dirAbsPrev {