mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
bisync: dry runs no longer commit filter changes
Fixed an issue causing dry runs to inadvertently commit filter changes https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Dry%20runs%20are%20not%20completely%20dry
This commit is contained in:
@@ -210,9 +210,13 @@ func (opt *Options) applyFilters(ctx context.Context) (context.Context, error) {
|
||||
}
|
||||
|
||||
if opt.Resync {
|
||||
if opt.DryRun {
|
||||
fs.Infof(nil, "Skipped storing filters file hash to %s as --dry-run is set", hashFile)
|
||||
} else {
|
||||
fs.Infof(nil, "Storing filters file hash to %s", hashFile)
|
||||
if err := os.WriteFile(hashFile, []byte(gotHash), bilib.PermSecure); err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user