tpl/os: Make fileExist use the same filesystem as readFile
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 21 Apr 2018 21:46:34 +0000 (23:46 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 21 Apr 2018 21:46:34 +0000 (23:46 +0200)
Fixes #4633

tpl/os/os.go

index f005bd4a9ee832180af0d8e3bc60e6750dd6d39d..f7f9537ffed841911743246de145df6b61bdc2a6 100644 (file)
@@ -123,7 +123,7 @@ func (ns *Namespace) FileExists(i interface{}) (bool, error) {
                return false, errors.New("fileExists needs a path to a file")
        }
 
-       status, err := afero.Exists(ns.deps.Fs.WorkingDir, path)
+       status, err := afero.Exists(ns.readFileFs, path)
        if err != nil {
                return false, err
        }