From: Jelmer Tiete Date: Sun, 11 Sep 2016 08:48:31 +0000 (-0700) Subject: Fixe target path location check in jekyll import command X-Git-Tag: v0.17~90 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5867cb5a92ba7bda5c559b0a7b86d2bdac10f474;p=brevno-suite%2Fhugo Fixe target path location check in jekyll import command --- diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go index 20356f1e..7c595d8a 100644 --- a/commands/import_jekyll.go +++ b/commands/import_jekyll.go @@ -81,7 +81,7 @@ func importFromJekyll(cmd *cobra.Command, args []string) error { jww.INFO.Println("Import Jekyll from:", jekyllRoot, "to:", targetDir) - if strings.HasPrefix(targetDir, jekyllRoot) { + if strings.HasPrefix(filepath.Dir(targetDir), jekyllRoot) { return newUserError("Target path should not be inside the Jekyll root, aborting.") }