mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Fixe target path location check in jekyll import command
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
7d3dfba84b
commit
5867cb5a92
@@ -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.")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user