mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
This commit is contained in:
@@ -33,10 +33,18 @@ type DuplicatesReporter interface {
|
||||
ReportDuplicates() string
|
||||
}
|
||||
|
||||
var (
|
||||
_ FilesystemUnwrapper = (*createCountingFs)(nil)
|
||||
)
|
||||
|
||||
func NewCreateCountingFs(fs afero.Fs) afero.Fs {
|
||||
return &createCountingFs{Fs: fs, fileCount: make(map[string]int)}
|
||||
}
|
||||
|
||||
func (fs *createCountingFs) UnwrapFilesystem() afero.Fs {
|
||||
return fs.Fs
|
||||
}
|
||||
|
||||
// ReportDuplicates reports filenames written more than once.
|
||||
func (c *createCountingFs) ReportDuplicates() string {
|
||||
c.mu.Lock()
|
||||
|
Reference in New Issue
Block a user