shithub: hugo

Download patch

ref: 51af1d2eadcad89e8c2906c05549352ef69ab016
parent: 1b9dc52ef557b3d6892bbe45f011fc11d67543ba
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Apr 21 19:46:34 EDT 2018

tpl/os: Make fileExist use the same filesystem as readFile

Fixes #4633

--- a/tpl/os/os.go
+++ b/tpl/os/os.go
@@ -123,7 +123,7 @@
 		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
 	}