Fixe target path location check in jekyll import command

This commit is contained in:
Jelmer Tiete authored and Bjørn Erik Pedersen committed 2016-09-11 10:48:31 +02:00
1 parent 7d3dfba84b
commit 5867cb5a92
1 file changed
+1 -1
+1 -1
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.")
}