From cb48425f2d0d4c261eaf04d872dbf2192854bca2 Mon Sep 17 00:00:00 2001 From: spf13 Date: Mon, 16 Nov 2015 21:53:05 -0500 Subject: [PATCH] No double slash when destination set to '/' --- commands/hugo.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/hugo.go b/commands/hugo.go index ae9a3f6dd..a805d05db 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