Hello ,
i think I have bug report, but I am not sure, wheter this behavior of ROOT might be on purpose.
The thing:
TFile* runfile = new TFile(“Brick.root”,“RECREATE”);
creates a new file if it doesnt exist.
If this file is a link, then it overwrites the link.
Now suppose you do the following in your shell:
mkdir directory
touch directory/test.root
ln -s directory/test.root testlink.root
root
File* file2 = new TFile(“testlink.root”,“RECREATE”)
.q
the file testlink.root is now not anymore a link, but a regular root file.
But now do the following
mkdir directory
touch directory/test.root
ln -s directory/test.root testlink.root
rm -rf directory
ls -l test.root
a dead link appears
root
File* file2 = new TFile(“testlink.root”,“RECREATE”)
now you get the error.
So the final error was that root cannot overwrite a dead link to a file.
Is this behaviour intended?
Best greetings.
P.S. I ran it with root 5.24, compiled with gcc4.1 on a ubuntu 10.04lts3 system.