Fixe target path location check in jekyll import command

This commit is contained in:
Jelmer Tiete 2016-09-11 01:48:31 -07:00 committed by Bjørn Erik Pedersen
parent 7d3dfba84b
commit 5867cb5a92

View file

@ -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.")
}