shithub: hugo

Download patch

ref: cb48425f2d0d4c261eaf04d872dbf2192854bca2
parent: ef0b9b511c104422cd1fbd8e6a85fb424ab9b827
author: spf13 <[email protected]>
date: Mon Nov 16 16:53:05 EST 2015

No double slash when destination set to '/'

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -352,6 +352,11 @@
 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