From c3115292a7f2d2623cb45054a361e997ad9330c9 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Sun, 3 Jun 2018 05:45:33 -0600 Subject: [PATCH] tpl: Prevent isBaseTemplate() from matching "baseof" in dir Fixes #4809 --- tpl/tplimpl/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go index 74860b67e..8f91113a8 100644 --- a/tpl/tplimpl/template.go +++ b/tpl/tplimpl/template.go @@ -726,5 +726,5 @@ func isBackupFile(path string) bool { const baseFileBase = "baseof" func isBaseTemplate(path string) bool { - return strings.Contains(path, baseFileBase) + return strings.Contains(filepath.Base(path), baseFileBase) }