Hi Sue, I have modified TFile::Recover such that the file is declared a Zombie if no keys can be recovered. Fix in CVS. Rene Brun Susan Kasahara wrote: > > Hi root team, > Sometimes we need to read a file that was left open by an aborted write job. In this > case the file is not properly closed, and on read of the file the TFile::Recover method > will attempt to rebuild the key directory for the file. If the TFile::Recover method > fails to recover any keys for the file it prints the warning message: "no keys recovered" > for the file, but I can't seem to find a way to determine at run time that in this case the > file is unreadable. The TFile methods IsZombie() and IsOpen() both indicate after > TFile construction that the file is open and ready to be read. This causes my code > to go ahead and attempt to read the set of keys from the file (TDirectory::ReadKeys > returns a non-null number of keys) and use the keys, eventually resulting in a segv. > Is it possible to determine at run-time that the file was not recoverable? > I am using cvs root last updated on 1/22/02. > -Sue
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET