tpl: Prevent isBaseTemplate() from matching "baseof" in dir
authorAnthony Fok <foka@debian.org>
Sun, 3 Jun 2018 11:45:33 +0000 (05:45 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 4 Jun 2018 07:09:55 +0000 (10:09 +0300)
Fixes #4809

tpl/tplimpl/template.go

index 74860b67e45a12271385e6092ab5e272f9e1e653..8f91113a829e90578f893f113f1199e85acb8322 100644 (file)
@@ -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)
 }