No double slash when destination set to '/' - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit cb48425f2d0d4c261eaf04d872dbf2192854bca2
DIR parent ef0b9b511c104422cd1fbd8e6a85fb424ab9b827
HTML Author: spf13 <steve.francia@gmail.com>
Date: Mon, 16 Nov 2015 21:53:05 -0500
No double slash when destination set to '/'
Diffstat:
M commands/hugo.go | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
---
DIR diff --git 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