mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 16:41:34 +02:00
sync: don't update mod times if --dry-run set - fixes #1100
This commit is contained in:
@ -308,10 +308,22 @@ func TestSyncAfterChangingModtimeOnly(t *testing.T) {
|
||||
fstest.CheckItems(t, r.flocal, file1)
|
||||
fstest.CheckItems(t, r.fremote, file2)
|
||||
|
||||
fs.Config.DryRun = true
|
||||
defer func() { fs.Config.DryRun = false }()
|
||||
|
||||
fs.Stats.ResetCounters()
|
||||
err := fs.Sync(r.fremote, r.flocal)
|
||||
require.NoError(t, err)
|
||||
|
||||
fstest.CheckItems(t, r.flocal, file1)
|
||||
fstest.CheckItems(t, r.fremote, file2)
|
||||
|
||||
fs.Config.DryRun = false
|
||||
|
||||
fs.Stats.ResetCounters()
|
||||
err = fs.Sync(r.fremote, r.flocal)
|
||||
require.NoError(t, err)
|
||||
|
||||
fstest.CheckItems(t, r.flocal, file1)
|
||||
fstest.CheckItems(t, r.fremote, file1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user