This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
|
||||
const (
|
||||
OldestHandledVersion = 10
|
||||
CurrentVersion = 31
|
||||
CurrentVersion = 32
|
||||
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
||||
)
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ func TestDeviceConfig(t *testing.T) {
|
||||
},
|
||||
WeakHashThresholdPct: 25,
|
||||
MarkerName: DefaultMarkerName,
|
||||
JunctionsAsDirs: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ type FolderConfiguration struct {
|
||||
BlockPullOrder BlockPullOrder `xml:"blockPullOrder" json:"blockPullOrder"`
|
||||
CopyRangeMethod fs.CopyRangeMethod `xml:"copyRangeMethod" json:"copyRangeMethod" default:"standard"`
|
||||
CaseSensitiveFS bool `xml:"caseSensitiveFS" json:"caseSensitiveFS"`
|
||||
JunctionsAsDirs bool `xml:"junctionsAsDirs" json:"junctionsAsDirs"`
|
||||
|
||||
cachedModTimeWindow time.Duration
|
||||
|
||||
@@ -101,7 +102,11 @@ func (f FolderConfiguration) Copy() FolderConfiguration {
|
||||
func (f FolderConfiguration) Filesystem() fs.Filesystem {
|
||||
// This is intentionally not a pointer method, because things like
|
||||
// cfg.Folders["default"].Filesystem() should be valid.
|
||||
filesystem := fs.NewFilesystem(f.FilesystemType, f.Path)
|
||||
var opts []fs.Option
|
||||
if f.FilesystemType == fs.FilesystemTypeBasic && f.JunctionsAsDirs {
|
||||
opts = append(opts, fs.WithJunctionsAsDirs())
|
||||
}
|
||||
filesystem := fs.NewFilesystem(f.FilesystemType, f.Path, opts...)
|
||||
if !f.CaseSensitiveFS {
|
||||
filesystem = fs.NewCaseFilesystem(filesystem)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
// update the config version. The order of migrations doesn't matter here,
|
||||
// put the newest on top for readability.
|
||||
var migrations = migrationSet{
|
||||
{32, migrateToConfigV32},
|
||||
{31, migrateToConfigV31},
|
||||
{30, migrateToConfigV30},
|
||||
{29, migrateToConfigV29},
|
||||
@@ -91,6 +92,12 @@ func migrateToConfigV31(cfg *Configuration) {
|
||||
cfg.Options.UnackedNotificationIDs = append(cfg.Options.UnackedNotificationIDs, "authenticationUserAndPassword")
|
||||
}
|
||||
|
||||
func migrateToConfigV32(cfg *Configuration) {
|
||||
for i := range cfg.Folders {
|
||||
cfg.Folders[i].JunctionsAsDirs = true
|
||||
}
|
||||
}
|
||||
|
||||
func migrateToConfigV30(cfg *Configuration) {
|
||||
// The "max concurrent scans" option is now spelled "max folder concurrency"
|
||||
// to be more general.
|
||||
|
||||
Reference in New Issue
Block a user