synthfs: generated files should have size=0.

This way we don't need to generate the file just to see how big it would get.
This commit is contained in:
Andreas Kling 2018-10-24 00:50:23 +02:00
parent b40c851fce
commit 57136ad87e
Notes: sideshowbarker 2024-07-19 18:39:44 +09:00

View file

@ -105,10 +105,7 @@ InodeMetadata SyntheticFileSystem::inodeMetadata(InodeIdentifier inode) const
if (inode.index() == 0 || inode.index() > m_files.size())
return InodeMetadata();
auto& file = *m_files[inode.index() - 1];
auto metadata = file.metadata;
if (file.generator)
metadata.size = file.generator().size();
return metadata;
return file.metadata;
}
bool SyntheticFileSystem::setModificationTime(InodeIdentifier, dword timestamp)