newRPL: [UPDATED April 27-2017] Firmware for testing available for download
|
08-14-2016, 02:14 AM
Post: #377
|
|||
|
|||
RE: newRPL: [UPDATED July-25-16] Firmware for testing available for download
(08-02-2016 07:14 PM)Claudio L. Wrote:I have another question regarding this section: If NTRes is commented out because it doesn't change (except for possibly bits 4-3 during a file rename), does this imply that CreatTimeDate and CrtTmTenth do change here (they shouldn't unless during file creation)?(08-01-2016 01:31 AM)matthiaspaul Wrote: // mainentry[12] = file->NTRes;That's exactly the reason why it's commented out: the bits must not be changed. This function does read-modify-write on an existing entry, only to update the size, date, etc. when you close the file, and it only modifies what needs to be modified, then writes back. I could probably answer that question myself by digging deeper into the call hierarchy of your code, but as I haven't found the time for that so far and since you wrote that this piece of code is just used to modify existing entries (not to initialize new ones), setting the create date/time seems unnecessary as well here. Reinitializing with the same values read when opening the file would not cause any problems (just be redundant), but if the create date/time would be calculated afresh and applied to an already existing entry, this would not only undermine the very purpose of a create date/time stamp, but also overwrite some alternative data possibly residing at this location - which could cause problems elsewhere. So, this might be worth another close look. Greetings, Matthias -- "Programs are poems for computers." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 13 Guest(s)