internal void OnNameDetected(string name, bool cache = false, bool listed = false)
{
if (!string.IsNullOrEmpty(this.Name)) return;
// TODO: Improve the name caching mechanism (Global hash table for MPQ archives ?)
if (cache || (this.Flags & MpqFileFlags.Encrypted) != 0)
this.Seed = ComputeSeed(name);
if (cache || (this.Flags & MpqFileFlags.Patch) != 0)
this.Name = name; // Always cache the filename if the file is a patch… This is needed for base file lookup.
if (cache) this.Listed = listed;
}