2019-09-26 03:27 PM
After using FatFS to create and time-stamp a directory on an SD card, when viewing the results using the command prompt to list the contents of the directory, the first two files shown are always the '.' and '..' entries. These are not getting time-stamped causing an "Parameter is Invalid" error. Does anyone know to cause FatFS to time-stamp these two files. I am able to time-stamp the directory name, or file name as needed. Just these two.
Directory of C:\Users\JaneDoe\Source
@!?A <DIR> . Parameter is Invalid
<DIR> ..
09/20/2019 04:40 PM 9,017 JanesFile.obj
(instead of)
Directory of C:\Users\JaneDoe\Source
09/20/2019 04:40 PM <DIR> .
09/20/2019 04:40 PM <DIR> ..
09/20/2019 04:40 PM 9,017 JanesFile.obj
#?!$?% <DIR> . Parameter is Invalid
<DIR> ..
09/20/2019 04:40 PM 9,017 JanesFile.obj
2019-09-26 04:11 PM
The directory was created with a system where time functionality wasn't working.
f_utime(), as I scan it, specifically excludes walking to "." or ".." and returns FR_INVALID_NAME
You'd want to patch it to remediate this deficiency.
Best to start with the current release, the release provided by ST breaks on large cards.
2019-09-26 04:30 PM
Actually, the directory was created and f_utime applied and is reflected in the time/date shown next to the directory name which is, in my case, within the root directory. The time functionality is working just fine.
I will see if I care to patch the code to walk to the . and .. entries as you suggest. 90% of us will probably never see this deficiency manifest, anyway - it's not a problem in Windows explorer or other "finder" type utility.
Thanks for scanning the f_utime code.