projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d3dfba
)
Fixe target path location check in jekyll import command
author
Jelmer Tiete
<jelmer@tiete.be>
Sun, 11 Sep 2016 08:48:31 +0000
(
01:48
-0700)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Sun, 11 Sep 2016 08:48:31 +0000
(10:48 +0200)
commands/import_jekyll.go
patch
|
blob
|
history
diff --git
a/commands/import_jekyll.go
b/commands/import_jekyll.go
index 20356f1e1662df0d19d5433cd62127ed8551602d..7c595d8a17deebad4ab20aadebf9581bacbe1426 100644
(file)
--- 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.")
}