ciderpress icon indicating copy to clipboard operation
ciderpress copied to clipboard

MDC to output filename from within zip file archive

Open roughana opened this issue 5 years ago • 2 comments

Refer to ftp.apple.asimov.net/images/gs/sound/midi/midi1.zip It contains one file: Bach Art of Fugue.2mg Running through MDC produces the following (partially redacted at '...'):

MDC for Windows v3.0.0 (DiskImg library v5.0.1) Copyright (C) 2014 by faddenSoft, LLC. All rights reserved. MDC is part of CiderPress, available from http://www.a2ciderpress.com/. Linked against NufxLib v3.1.0 and zlib v1.2.8 ... File: midi1.zip Disk: ProDOS /BACH1 (800KB) Name Type Auxtyp Modified Format Length

ABOUTBACHFUG TXT $0000 11-Jan-94 21:37 ProDOS 1458 ...

Notice that the filename of the image within the zipfile is not output by MDC. I'd like to see that filename (Bach Art of Fugue.2mg) as it could provide useful context to the contents.

roughana avatar Jul 21 '19 13:07 roughana

Is this as simple as adding the following? (warning, I am not proficient at cpp and know enough to be dangerous) https://github.com/fadden/ciderpress/blob/master/mdc/Main.cpp#L905 fprintf("Sub-volume name: ", subVolName, "\n");

roughana avatar Jul 21 '19 13:07 roughana

.zip and .gz are considered "outer wrappers", which CiderPress does its best to conceal the existence of internally. It looks like the filename is held in the fStoredFileName field, but that's private, and not used for anything outside of the OuterWrapper code (it's retained so that, if you update the disk image, we have the name on hand when updating the Zip archive).

Sub-volumes are things like ProDOS volumes inside an image of a hard drive with multiple partitions, or DOS Master volumes on an 800K floppy (e.g. this).

It would be possible to expose it, but the change is not a one-liner in MDC.

fadden avatar Jul 21 '19 16:07 fadden

This will not be addressed in CiderPress. But I think this does the trick:

% cp2 mdc pub/apple_II/images/gs/sound/midi/midi1.zip
CiderPress II v0.1.0-dev1 Multi-Disk Catalog (ubuntu.20.04-x64)

File: pub/apple_II/images/gs/sound/midi/midi1.zip
Type Auxtyp Modified        Format    Length Size Name                          
---- ------ --------------- ------- -------- ---- ------------------------------
---- ----   03-May-05 20:12 Deflate   819264  27% Bach Art of Fugue.2mg

  Catalog of "Bach Art of Fugue.2mg"
  Disk image (2IMG) - 800KB ProDOS "BACH1", 483 blocks free
  Type Auxtyp Modified          Length  Storage *Name                             
  ---- ------ --------------- -------- -------- ----------------------------------
  TXT  $0000  11-Jan-94 21:37     1458     2048  ABOUTBACHFUG
  MUS  $0001  11-Jan-94 21:59    23396    24064  CANONL14.SEQ
  [...]

fadden avatar May 12 '23 01:05 fadden