long file names in TFile ctor

From: David Kirkby (kirkby@hep.stanford.edu)
Date: Thu Nov 11 1999 - 21:03:23 MET


Hi - I have found a problem opening root files which were created with
very long path names:

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   2.23/07   27 October 1999   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v1.1 used to render TrueType fonts.

CINT/ROOT C/C++ Interpreter version 5.14.20, Oct 20 1999
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TFile f(...veryLongPathHere..., "CREATE");
root [1] f.Close();                                                                            
root [2] TFile g(...veryLongPathHere..., "READ");
Error in <TFile::Init>: Cannot read directory info

The error is generated when the size of the TNamed base class of the TFile
object exceeds 300 bytes. In my test, I used a path 145 characters long.
Presumably this is intended as a sanity check before reading Mb of 'name'
data, but isn't a 300 byte limit too short, especially since the ctor
doesn't make any check on the length when you create the file.

Can this 300 byte limit be increased significantly or removed in a future
release, or is there a good reason to keep it?

David Kirkby
Stanford University
BaBar/SLAC



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:42 MET