Skip to content

Commit

Permalink
Fix #15422.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 20, 2024
1 parent fc71d79 commit bc93bb8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions core/src/main/java/ch/cyberduck/core/transfer/CopyTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,6 @@ public List<TransferItem> list(final Session<?> session, final Path directory, f

@Override
public void pre(final Session<?> source, final Session<?> destination, final Map<TransferItem, TransferStatus> files, final TransferPathFilter filter, final TransferErrorCallback error, final ProgressListener listener, final ConnectionCallback callback) throws BackgroundException {
final Bulk<?> download = source.getFeature(Bulk.class);
{
final Object id = download.pre(Type.download, files, callback);
log.debug("Obtained bulk id {} for transfer {}", id, this);
}
final Bulk<?> upload = destination.getFeature(Bulk.class);
{
final Map<TransferItem, TransferStatus> targets = new HashMap<>();
Expand All @@ -212,14 +207,15 @@ public void pre(final Session<?> source, final Session<?> destination, final Map
final Object id = upload.pre(Type.upload, targets, callback);
log.debug("Obtained bulk id {} for transfer {}", id, this);
}
final Bulk<?> download = source.getFeature(Bulk.class);
{
final Object id = download.pre(Type.download, files, callback);
log.debug("Obtained bulk id {} for transfer {}", id, this);
}
}

@Override
public void post(final Session<?> source, final Session<?> destination, final Map<TransferItem, TransferStatus> files, final TransferErrorCallback error, final ProgressListener listener, final ConnectionCallback callback) throws BackgroundException {
final Bulk<?> download = source.getFeature(Bulk.class);
{
download.post(Type.download, files, callback);
}
final Bulk<?> upload = destination.getFeature(Bulk.class);
{
final Map<TransferItem, TransferStatus> targets = new HashMap<>();
Expand All @@ -228,6 +224,10 @@ public void post(final Session<?> source, final Session<?> destination, final Ma
}
upload.post(Type.upload, targets, callback);
}
final Bulk<?> download = source.getFeature(Bulk.class);
{
download.post(Type.download, files, callback);
}
}

@Override
Expand Down

0 comments on commit bc93bb8

Please sign in to comment.