SQLite Archiver

Ticket Change Details

Artifact ID: 864e9759e5dadd566584f669fb50f7d322f0b8ec
Ticket: 9dafc304842267ed73268d3fc43497ef64891144
sqlar tosses file mod times
User & Date: anonymous 2017-12-14 06:03:37

  1. foundin changed to: "tip as of today"
  2. icomment:
    sqlar.c, as of check-in [4a0ed63dae] at 2017-12-02 19:15:43 on branch trunk, in its write_file() function, does nothing with the mtime argument. Upon restoration out of an archive, all files have the same, nearly useless timestamp.
    Adding these lines in the right places fixes this deficiency:
      #include <utime.h> // near sqlar.c top
      struct utimbuf tb = { mtime, mtime }; // near write_file top
      rc = utime(zFilename, &tb);  // at write_file bottom
      if( rc ) errorMsg("cannot set timestamps: %s\n", zFilename);
    I'm sure that including mtime in the schema was well motivated, so I cite that in lieu of an argument for actually preserving the corresponding file attribute.
  3. login: "anonymous"
  4. mimetype: "text/x-fossil-plain"
  5. private_contact changed to: "a3f9bb81e58d0893fc9338b98ddc62e27a349b16"
  6. severity changed to: "Important"
  7. status changed to: "Open"
  8. title changed to: "sqlar tosses file mod times"
  9. type changed to: "Feature_Request"