Directory dates when copying with XAD

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Directory dates when copying with XAD

Post by jPV »

If I unpack an archive with XAD and CopyFile(), all directories inside the archive will get an arbitrary date on them (04-Nov-02 10:30:00). Even if I define a non-existent path as the destination directory, the newly created dir gets this wrong date. They should get the current date or if real directory dates are stored in the archive, use those. Tested under MorphOS.

Code: Select all

@REQUIRE "xad", {InstallAdapter = True}

; Why directories get a date of 04-Nov-02 10:30:00? Why not the date stored in the archive (if available) or the current date?
; Even the automatically created "unpack" dir, which isn't in the archive itself, gets the 2002 date.
CopyFile("test.lha", "ram:unpack")
NPrint("Check the date of ram:unpack/testdir. It's something from 2002,\nwhich is incorrect. Click LMB.")
WaitLeftMouse
Here is everything needed for testing (.hws and test archive).
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Directory dates when copying with XAD

Post by airsoftsoftwair »

04-Nov-02 10:30:00 is the start of Hollywood time because that's when Hollywood 1.0 was released :)

Still have to find out why it behaves the way it does, though :)
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Directory dates when copying with XAD

Post by airsoftsoftwair »

Fixed now in both the XAD and also the ZIP plugin.

Code: Select all

- New: Added support for Hollywood's new ability to query the attributes of a directory handled
  by a directory adapter; this will allow the XAD plugin to set directory date stamps correctly when
  extracting files from an archive using Hollywood's CopyFile() function; note, however, that directories
  are often not stored as individual entries in archives; in that case, the directory date will be set
  to the current date and time because no other directory date information is available
Post Reply