fs/operations/operationsflags: warn about logs in conjunction with --no-traverse

This commit is contained in:
Marvin Rösch 2024-10-07 11:54:56 +02:00
parent 3caffd2dd1
commit 403783d851
No known key found for this signature in database
GPG Key ID: 851D6C792B4D68FD

View File

@ -119,5 +119,16 @@ func ConfigureLoggers(ctx context.Context, fdst fs.Fs, command *cobra.Command, o
}
}
ci := fs.GetConfig(ctx)
if ci.NoTraverse && opt.Combined != nil {
fs.LogPrintf(fs.LogLevelWarning, nil, "--no-traverse does not list any deletes (-) in --combined output\n")
}
if ci.NoTraverse && opt.MissingOnSrc != nil {
fs.LogPrintf(fs.LogLevelWarning, nil, "--no-traverse makes --missing-on-src produce empty output\n")
}
if ci.NoTraverse && opt.DestAfter != nil {
fs.LogPrintf(fs.LogLevelWarning, nil, "--no-traverse makes --dest-after produce incomplete output\n")
}
return close, nil
}