mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 01:53:08 +00:00
No double slash when destination set to '/'
This commit is contained in:
parent
ef0b9b511c
commit
cb48425f2d
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue