Ticket Hash: | 9dafc304842267ed73268d3fc43497ef64891144 | ||
Title: | sqlar tosses file mod times | ||
Status: | Open | Type: | Feature_Request |
Severity: | Important | Priority: | |
Subsystem: | Resolution: | ||
Last Modified: |
2017-12-14 06:03:37 7.55 years ago |
Created: |
2017-12-14 06:03:37 7.55 years ago |
Version Found In: | tip as of today |
User Comments: | ||||
anonymous added on 2017-12-14 06:03:37:
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. |