mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05: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 {
|
func copyStatic() error {
|
||||||
publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + "/"
|
publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + "/"
|
||||||
|
|
||||||
|
// If root, remove the second '/'
|
||||||
|
if publishDir == "//" {
|
||||||
|
publishDir = "/"
|
||||||
|
}
|
||||||
|
|
||||||
syncer := fsync.NewSyncer()
|
syncer := fsync.NewSyncer()
|
||||||
syncer.NoTimes = viper.GetBool("notimes")
|
syncer.NoTimes = viper.GetBool("notimes")
|
||||||
syncer.SrcFs = hugofs.SourceFs
|
syncer.SrcFs = hugofs.SourceFs
|
||||||
|
|
Loading…
Reference in a new issue