lib/fs: Expose fs option on interface (fixes #7385, ref #7381) (#7389)

This commit is contained in:
Simon Frei
2021-03-11 15:23:56 +01:00
committed by GitHub
parent cdef503db6
commit 3938b61c3f
9 changed files with 74 additions and 36 deletions
+2 -2
View File
@@ -47,11 +47,11 @@ func (f FolderConfiguration) Filesystem() fs.Filesystem {
// cfg.Folders["default"].Filesystem() should be valid.
var opts []fs.Option
if f.FilesystemType == fs.FilesystemTypeBasic && f.JunctionsAsDirs {
opts = append(opts, fs.WithJunctionsAsDirs())
opts = append(opts, new(fs.OptionJunctionsAsDirs))
}
filesystem := fs.NewFilesystem(f.FilesystemType, f.Path, opts...)
if !f.CaseSensitiveFS {
filesystem = fs.NewCaseFilesystem(filesystem, opts...)
filesystem = fs.NewCaseFilesystem(filesystem)
}
return filesystem
}