Changeset 1761 for trunk


Ignore:
Timestamp:
02/18/03 20:26:02 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1758 r1761  
    11
    22                                                         -*-*- END -*-*-
     3 2003/02/18: Thomas Bretz
     4 
     5    * mfileio/MReadTree.cc:
     6      - added a fix for a bug in the workaround using wildcards
     7
     8
     9
    310 2003/02/14: Thomas Bretz
    411 
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r1668 r1761  
    202202    //  (Code taken from TFile::TFile
    203203    //
    204     const char *name;
    205 
    206     TString newname;
    207 
    208     if ((name = gSystem->ExpandPathName(fname)))
    209     {
    210         newname = name;
    211         delete [] name;
    212     }
    213 
    214     if (newname.IsNull())
    215     {
    216         *fLog << err << dbginf << "Error expanding path " << fname << "." << endl;
    217         return 0;
    218     }
    219 
    220     if (gSystem->AccessPathName(newname, kFileExists))
    221     {
    222         *fLog << err << "ERROR - File '" << fname << "' does not exist." << endl;
    223         return 0;
    224     }
    225 
    226     fname = newname.Data();
     204    if (strrchr(fname, '?') || strrchr(fname, '*'))
     205        *fLog << warn << "WARNING: You may encounter crashes closing the files..." << endl;
     206    else
     207    {
     208        const char *name;
     209
     210        TString newname;
     211
     212        if ((name = gSystem->ExpandPathName(fname)))
     213        {
     214            newname = name;
     215            delete [] name;
     216        }
     217
     218        if (newname.IsNull())
     219        {
     220            *fLog << err << dbginf << "Error expanding path " << fname << "." << endl;
     221            return 0;
     222        }
     223
     224        if (gSystem->AccessPathName(newname, kFileExists))
     225        {
     226            *fLog << err << "ERROR - File '" << fname << "' does not exist." << endl;
     227            return 0;
     228        }
     229
     230        fname = newname.Data();
     231    }
    227232#endif
    228233
Note: See TracChangeset for help on using the changeset viewer.