* make vfs::Entry time stamps consistent (as Windows FILETIME)

This commit is contained in:
Ink
2017-01-06 03:31:32 +03:00
parent 2a2b7ae8f7
commit 0d8a81137c
2 changed files with 10 additions and 6 deletions

View File

@@ -184,9 +184,11 @@ StfsContainerDevice::Error StfsContainerDevice::ReadAllEntries(
}
entry->size_ = file_size;
entry->allocation_size_ = xe::round_up(file_size, bytes_per_sector());
entry->create_timestamp_ = update_timestamp;
entry->access_timestamp_ = access_timestamp;
entry->write_timestamp_ = update_timestamp;
// Convert to 100-nanosecond intervals since January 1, 1601 (UTC)
entry->create_timestamp_ = (update_timestamp + 11644473600000LL) * 10000;
entry->access_timestamp_ = (access_timestamp + 11644473600000LL) * 10000;
entry->write_timestamp_ = (update_timestamp + 11644473600000LL) * 10000;
all_entries.push_back(entry.get());
// Fill in all block records.