generateDestinationURL generates destination url for given source url if it would have been in destination.
(srcurl, dsturl *url.URL, isBatch bool)
| 533 | // generateDestinationURL generates destination url for given |
| 534 | // source url if it would have been in destination. |
| 535 | func generateDestinationURL(srcurl, dsturl *url.URL, isBatch bool) *url.URL { |
| 536 | objname := srcurl.Base() |
| 537 | if isBatch { |
| 538 | objname = srcurl.Relative() |
| 539 | } |
| 540 | |
| 541 | if dsturl.IsRemote() { |
| 542 | if dsturl.IsPrefix() || dsturl.IsBucket() { |
| 543 | return dsturl.Join(objname) |
| 544 | } |
| 545 | return dsturl.Clone() |
| 546 | |
| 547 | } |
| 548 | |
| 549 | return dsturl.Join(objname) |
| 550 | } |
| 551 | |
| 552 | // shouldSkipObject checks is object should be skipped. |
| 553 | func (s Sync) shouldSkipSrcObject(object *storage.Object, verbose bool) bool { |