aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/os
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-04-21 23:46:34 +0200
committerBjørn Erik Pedersen <[email protected]>2018-04-21 23:46:34 +0200
commit51af1d2eadcad89e8c2906c05549352ef69ab016 (patch)
tree9344bf3b1b5778a16c6961d838cbc7ad9396d7c1 /tpl/os
parent1b9dc52ef557b3d6892bbe45f011fc11d67543ba (diff)
downloadhugo-51af1d2eadcad89e8c2906c05549352ef69ab016.tar.gz
hugo-51af1d2eadcad89e8c2906c05549352ef69ab016.zip
tpl/os: Make fileExist use the same filesystem as readFile
Fixes #4633
Diffstat (limited to 'tpl/os')
-rw-r--r--tpl/os/os.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/os/os.go b/tpl/os/os.go
index f005bd4a9..f7f9537ff 100644
--- a/tpl/os/os.go
+++ b/tpl/os/os.go
@@ -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
}