Implement -I, --ignore-times for unconditional upload - fixes #311

This commit is contained in:
Nick Craig-Wood
2016-03-22 17:02:27 +00:00
parent cb22583212
commit ced3a4bc19
4 changed files with 54 additions and 0 deletions

View File

@ -315,6 +315,12 @@ func checkOne(pair ObjectPair, out ObjectPairChan) {
Debug(src, "Destination exists, skipping")
return
}
// If we should upload unconditionally
if Config.IgnoreTimes {
Debug(src, "Uploading unconditionally as --ignore-times is in use")
out <- pair
return
}
// If UpdateOlder is in effect, skip if dst is newer than src
if Config.UpdateOlder {
srcModTime := src.ModTime()