From f0b2420b2bb87e098d56ab76bfb475571b16e321 Mon Sep 17 00:00:00 2001 From: Gerardo Ganis <Gerardo.Ganis@cern.ch> Date: Wed, 23 Apr 2008 12:42:18 +0000 Subject: [PATCH] From Jan-Fiete: make a couple of adjustments and add a couple of protections git-svn-id: http://root.cern.ch/svn/root/trunk@23453 27541ba8-7e3a-0410-8455-c3a389f83636 --- net/net/src/TFileStager.cxx | 20 +++++++++++++++++--- proof/proof/src/TProofDataSetManagerFile.cxx | 6 +++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/net/net/src/TFileStager.cxx b/net/net/src/TFileStager.cxx index 2e66be05e5d..bc2a803057b 100644 --- a/net/net/src/TFileStager.cxx +++ b/net/net/src/TFileStager.cxx @@ -125,9 +125,14 @@ Bool_t TFileStager::IsStaged(const char *f) TUrl u(f); u.SetOptions("filetype=raw"); TFile *ff = TFile::Open(u.GetUrl()); - Bool_t rc = (ff && !ff->IsZombie()) ? kTRUE : kFALSE; - ff->Close(); - delete ff; + Bool_t rc = kTRUE; + if (!ff || ff->IsZombie()) { + rc = kFALSE; + if (ff) { + ff->Close(); + delete ff; + } + } // Done return rc; } @@ -158,6 +163,15 @@ TString TFileStager::GetPathName(TObject *o) } else if (cn == "TFileInfo") { TFileInfo *fi = (TFileInfo *)o; pathname = (fi->GetCurrentUrl()) ? fi->GetCurrentUrl()->GetUrl() : ""; + if (fi->GetCurrentUrl()) { + if (strlen(fi->GetCurrentUrl()->GetAnchor()) > 0) { + TUrl url(*(fi->GetCurrentUrl())); + url.SetAnchor(""); + pathname = url.GetUrl(); + } + } else { + pathname = fi->GetCurrentUrl()->GetUrl(); + } } // Done diff --git a/proof/proof/src/TProofDataSetManagerFile.cxx b/proof/proof/src/TProofDataSetManagerFile.cxx index f3c67d8e68c..8ab39a1d36e 100644 --- a/proof/proof/src/TProofDataSetManagerFile.cxx +++ b/proof/proof/src/TProofDataSetManagerFile.cxx @@ -169,6 +169,10 @@ Bool_t TProofDataSetManagerFile::BrowseDataSets(const char *group, Bool_t exporting = (option & kExport) ? kTRUE : kFALSE; Bool_t updating = (option & kQuotaUpdate) ? kTRUE : kFALSE; + // If printing is required add kReadShort to the options + if (printing || updating) + option |= kReadShort; + // The last three options are mutually exclusive if (((Int_t)printing + (Int_t)exporting + (Int_t)updating) > 1) { Error("BrowseDataSets", @@ -794,7 +798,7 @@ Int_t TProofDataSetManagerFile::ScanDataSet(TFileCollection *dataset, fileInfo->GetCurrentUrl()->GetUrl()); // Check if file is still available, if touch is set actually read from the file - TFile *file = TFile::Open(Form("%s?filetype=rawmxredir=7", url.GetUrl())); + TFile *file = TFile::Open(Form("%s?filetype=raw&mxredir=2", url.GetUrl())); if (file) { if (touch) { // Actually access the file -- GitLab