lib/fs: Correct wrapping order for meaningful log-caller (#7209)

This commit is contained in:
Simon Frei
2020-12-21 13:01:34 +01:00
committed by GitHub
parent 78bd0341a8
commit a744dee94c
5 changed files with 56 additions and 40 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ type caseFilesystemRegistry struct {
startCleaner sync.Once
}
func (r *caseFilesystemRegistry) get(fs Filesystem) *caseFilesystem {
func (r *caseFilesystemRegistry) get(fs Filesystem) Filesystem {
r.mut.Lock()
defer r.mut.Unlock()
@@ -98,7 +98,7 @@ type caseFilesystem struct {
// case-sensitive one. However it will add some overhead and thus shouldn't be
// used if the filesystem is known to already behave case-sensitively.
func NewCaseFilesystem(fs Filesystem) Filesystem {
return globalCaseFilesystemRegistry.get(fs)
return wrapFilesystem(fs, globalCaseFilesystemRegistry.get)
}
func (f *caseFilesystem) Chmod(name string, mode FileMode) error {