Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Tiete <jelmer@tiete.be>2016-09-11 11:48:31 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-11 11:48:31 +0300
commit5867cb5a92ba7bda5c559b0a7b86d2bdac10f474 (patch)
tree78643e9549556f9592d068984c38d4413a9c2a18 /commands
parent7d3dfba84b52ce8f33cc77380e3cc4c586a35201 (diff)
Fixe target path location check in jekyll import command
Diffstat (limited to 'commands')
-rw-r--r--commands/import_jekyll.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go
index 20356f1e1..7c595d8a1 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.")
}