From: Nuno Antunes Date: Sat, 28 Mar 2015 16:22:34 +0000 (+0000) Subject: Fix section name guessing on Windows X-Git-Tag: v0.14~161 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=61a02c4df8aeff4d236e2e5f206aeef06b794982;p=brevno-suite%2Fhugo Fix section name guessing on Windows --- diff --git a/commands/new.go b/commands/new.go index 5721b7f8..28831bf0 100644 --- a/commands/new.go +++ b/commands/new.go @@ -93,7 +93,7 @@ func NewContent(cmd *cobra.Command, args []string) { var kind string // assume the first directory is the section (kind) - if strings.Contains(createpath[1:], "/") { + if strings.Contains(createpath[1:], string(filepath.Separator)) { kind = helpers.GuessSection(createpath) }