mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 13:12:05 -05:00
Fixe target path location check in jekyll import command
This commit is contained in:
parent
7d3dfba84b
commit
5867cb5a92
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
jww.INFO.Println("Import Jekyll from:", jekyllRoot, "to:", targetDir)
|
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.")
|
return newUserError("Target path should not be inside the Jekyll root, aborting.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue