mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
@@ -162,9 +162,12 @@ func (fi *FileInfo) init() {
|
||||
}
|
||||
|
||||
func (sp *SourceSpec) NewFileInfo(baseDir, filename string, fi os.FileInfo) *FileInfo {
|
||||
dir, name := filepath.Split(filename)
|
||||
|
||||
dir = strings.TrimSuffix(dir, helpers.FilePathSeparator)
|
||||
dir, name := filepath.Split(filename)
|
||||
if !strings.HasSuffix(dir, helpers.FilePathSeparator) {
|
||||
dir = dir + helpers.FilePathSeparator
|
||||
}
|
||||
|
||||
baseDir = strings.TrimSuffix(baseDir, helpers.FilePathSeparator)
|
||||
|
||||
relDir := ""
|
||||
|
Reference in New Issue
Block a user