From: spf13 <steve.francia@gmail.com> Date: Tue, 17 Nov 2015 02:53:05 +0000 (-0500) Subject: No double slash when destination set to '/' X-Git-Tag: v0.15~51 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cb48425f;p=brevno-suite%2Fhugo No double slash when destination set to '/' --- diff --git a/commands/hugo.go b/commands/hugo.go index ae9a3f6d..a805d05d 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -352,6 +352,11 @@ func build(watches ...bool) { func copyStatic() error { publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + "/" + // If root, remove the second '/' + if publishDir == "//" { + publishDir = "/" + } + syncer := fsync.NewSyncer() syncer.NoTimes = viper.GetBool("notimes") syncer.SrcFs = hugofs.SourceFs