irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

Download multiple files results in tar with name .zip #247

Closed peterverraedt closed 1 year ago

peterverraedt commented 3 years ago

In case multiple files are selected under "Collections", and Action > Download is chosen, the resulting file has a .zip-extension but is actually a tar file.

See https://github.com/DICE-UNC/jargon-irods-ext/blob/master/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/CollectionServiceImpl.java#L768-L769 for relevant code, removing these lines results in a .tar-file that actually is a tar file.

The reason for this seems to be that in https://github.com/DICE-UNC/jargon/blob/master/jargon-core/src/main/java/org/irods/jargon/core/pub/BulkFileOperationsAOImpl.java#L102-L133 the given bundleType parameter is only used to write to the log, so the standard behaviour of irods will be used to create a tar.

Tested with metalnx 2.4.0.

michael-conway commented 3 years ago

I'll pick this one up

korydraughn commented 2 years ago

@michael-conway Any progress on this?

michael-conway commented 2 years ago

Let's chat Monday if this needs to be bumped I can do it

On Sun, Jul 31, 2022, 10:49 AM Kory Draughn @.***> wrote:

@michael-conway https://github.com/michael-conway Any progress on this?

— Reply to this email directly, view it on GitHub https://github.com/irods-contrib/metalnx-web/issues/247#issuecomment-1200439905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIL4LNCLVLVS43TXEQDBQLVW2G6VANCNFSM47HYNWGA . You are receiving this because you were mentioned.Message ID: @.***>

michael-conway commented 2 years ago

....have a pull request on this

trel commented 1 year ago

If this is working - please link to the PR/commit that fixes it - presumably in jargon proper?

I'm having a hard time following where this was addressed.

trel commented 1 year ago

Looks like the following commit in jargon-irods-ext addressed the issue by changing the default bundleType from ZIP to TAR.

https://github.com/DICE-UNC/jargon-irods-ext/commit/b17fb807441b8f120611c38e3ee7e7758547a3f5

-   zipServiceConfiguration.setPreferredBundleType(BundleType.ZIP);
+   zipServiceConfiguration.setPreferredBundleType(BundleType.TAR);