[ROOT] TDirectory::mkdir

From: Charles Leggett (CGLeggett@lbl.gov)
Date: Fri Aug 25 2000 - 22:38:32 MEST


TDirectory::mkdir() is not behaving as I would expect it to, and I'm
not sure if this is a bug or intentional.

Let's say I want to create a structure like:
	top/sub1/sub2

I would expect to be able to do:
   TDirectory *sb1 = top->mkdir("sub1");
   TDirectory *sb2 = sb1->mkdir("sub2");

Instead, this creates two subdirectories of top:
	top/sub1
	top/sub2

To make the desired structure, I have to do:
	TDirectory *sb1 = top->mkdir("sub1");
	sb1->cd();
	TDirectory *sb2 = top->mkdir("sub2");


Is this really intentional? It seems counter-intuitive to me.


				cheers...	Charles.


PS: this is with version 2.25/01

-- 
+---------------------------------------------------------------------+
| Charles Leggett                |        <CGLeggett@lbl.gov>         |
| Lawrence Berkeley National Lab |      HCG / NERSC : Atlas / D0      |
| 1 Cyclotron Road, MS 50B-3238  |                                    |
| Berkeley, CA 94720             | Eagles may soar, but weasels don't |
| (510) 495-2930  room: 50B-3201 |    get sucked into jet engines.    |
+------------------- http://annwm.lbl.gov/~leggett -------------------+



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET