Index: TFileMerger.cxx =================================================================== --- TFileMerger.cxx (revision 43149) +++ TFileMerger.cxx (working copy) @@ -751,6 +751,28 @@ } } + if((fFileList->GetEntries()==1) && !fExcessFiles->GetEntries() && !(in_type & kIncremental) && !fCompressionChange && !fExplicitCompLevel) { + fOutputFile->Close(); + SafeDelete(fOutputFile); + + TIter iter(fFileList); + TFile* file = (TFile*)iter(); + Bool_t result = file->Cp(fOutputFilename); + + if (file->TestBit(kCanDelete)) file->Close(); + // remove the temporary file + if(fLocal) { + TString p(file->GetPath()); + p = p(0, p.Index(':',0)); + gSystem->Unlink(p); + } + fFileList->Clear(); + if (!result) { + Error("Merge", "error during merge of your ROOT files"); + } + return result; + } + fOutputFile->SetBit(kMustCleanup); TDirectory::TContext ctxt(0);