diff --git a/src/dos/drive_fat.cpp b/src/dos/drive_fat.cpp index e383c28062..2f51e1999e 100644 --- a/src/dos/drive_fat.cpp +++ b/src/dos/drive_fat.cpp @@ -874,7 +874,13 @@ void fatDrive::SetLabel(const char *label, bool /*iscdrom*/, bool /*updatable*/) while (j < 11 && *s != 0) sectbuf[entryoffset].entryname[j++] = *s++; while (j < 11) sectbuf[entryoffset].entryname[j++] = ' '; } - writeSector(tmpsector,sectbuf); + uint16_t ct, cd; + time_t_to_DOS_DateTime(/*&*/ct,/*&*/cd, ::time(NULL)); + sectbuf[entryoffset].modTime = ct; + sectbuf[entryoffset].modDate = cd; + sectbuf[entryoffset].accessDate = cd; + + writeSector(tmpsector,sectbuf); labelCache.SetLabel(label, false, true); UpdateBootVolumeLabel(label); return;