mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
No double slash when destination set to '/'
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user