equal
deleted
inserted
replaced
621 raise util.Abort(_('no source or destination specified')) |
621 raise util.Abort(_('no source or destination specified')) |
622 if len(pats) == 1: |
622 if len(pats) == 1: |
623 raise util.Abort(_('no destination specified')) |
623 raise util.Abort(_('no destination specified')) |
624 dest = pats.pop() |
624 dest = pats.pop() |
625 destdirexists = os.path.isdir(dest) |
625 destdirexists = os.path.isdir(dest) |
626 if (len(pats) > 1 or util.patkind(pats[0], None)[0]) and not destdirexists: |
626 if not destdirexists: |
627 raise util.Abort(_('with multiple sources, destination must be an ' |
627 if len(pats) > 1 or util.patkind(pats[0], None)[0]: |
628 'existing directory')) |
628 raise util.Abort(_('with multiple sources, destination must be an ' |
|
629 'existing directory')) |
|
630 if dest.endswith(os.sep) or os.altsep and dest.endswith(os.altsep): |
|
631 raise util.Abort(_('destination %s is not a directory') % dest) |
629 if opts['after']: |
632 if opts['after']: |
630 tfn = targetpathafterfn |
633 tfn = targetpathafterfn |
631 else: |
634 else: |
632 tfn = targetpathfn |
635 tfn = targetpathfn |
633 copylist = [] |
636 copylist = [] |