Problem: 1382144
Title: (Files) TFile::Clone leaves bad AliasHandle in original TFile
Received: Aug 26 1996 9:31AM
I think it may be a problem to dispose the alias handle in TFile::Clone(). After calling inherited::Clone(), the aClonedFile->fAlias == this->fAlias. If we dispose the aClonedFile->fAlias, that means we dispose the original one too (this->fAlias, include alias record). That's incorrect. So it may be changed to:
TObject* TFile::Clone() { TFile* aClonedFile = (TFile*)inherited::Clone(); if (aClonedFile->fAlias) ::FailOSErr(GetAlias(aClonedFile->fAlias)); return aClonedFile; }
Modified UFile.cp as recommended.