Cyberduck Mountain Duck CLI

Changeset 43123


Ignore:
Timestamp:
Nov 3, 2017 1:01:00 PM (4 years ago)
Author:
dkocher
Message:

Set MIME type in copy worker for target file.

Location:
shelves/11.2017
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • shelves/11.2017

    • Property subgit:lock changed from commit:bddc8f32273868bd794b9eb905bd5ab14bfc00eb timestamp:2017-11-03T13:00:57.752 to commit:bfafcfbed6af70627ec8688641a2ce3f0eadc70d timestamp:2017-11-03T13:00:59.616
  • shelves/11.2017/core/src/main/java/ch/cyberduck/core/worker/CopyWorker.java

    r42539 r43123  
    1919import ch.cyberduck.core.ListService;
    2020import ch.cyberduck.core.LocaleFactory;
     21import ch.cyberduck.core.MappingMimeTypeService;
    2122import ch.cyberduck.core.Path;
    2223import ch.cyberduck.core.PathCache;
     
    9091                    else {
    9192                        targets.add(copy.copy(r.getKey(), r.getValue(), new TransferStatus()
    92                                 .exists(session.getFeature(Find.class, new DefaultFindFeature(session)).withCache(cache).find(r.getValue()))
    93                                 .length(r.getKey().attributes().getSize()), callback)
     93                            .withMime(new MappingMimeTypeService().getMime(r.getValue().getName()))
     94                            .exists(session.getFeature(Find.class, new DefaultFindFeature(session)).withCache(cache).find(r.getValue()))
     95                            .length(r.getKey().attributes().getSize()), callback)
    9496                        );
    9597                    }
     
    127129    public String getActivity() {
    128130        return MessageFormat.format(LocaleFactory.localizedString("Copying {0} to {1}", "Status"),
    129                 files.keySet().iterator().next().getName(), files.values().iterator().next().getName());
     131            files.keySet().iterator().next().getName(), files.values().iterator().next().getName());
    130132    }
    131133
  • shelves/11.2017/core/src/main/java/ch/cyberduck/core/worker/MoveWorker.java

    r42867 r43123  
    7070                result.put(r.getKey(), move.move(r.getKey(), r.getValue(), new TransferStatus()
    7171                        .withMime(new MappingMimeTypeService().getMime(r.getValue().getName()))
    72                         .exists(session.getFeature(Find.class, new DefaultFindFeature(session)).withCache(cache).find(r.getValue())),
     72                        .exists(session.getFeature(Find.class, new DefaultFindFeature(session)).withCache(cache).find(r.getValue()))
     73                        .length(r.getKey().attributes().getSize()),
    7374                    new Delete.Callback() {
    7475                        @Override
Note: See TracChangeset for help on using the changeset viewer.