Ignore:
Timestamp:
09/03/07 10:37:51 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MEnv.cc

    r8716 r8727  
    4141// some of the resources.
    4242//
     43// If given paths are not absolute there base is always th elocation of
     44// the including file.
     45//
    4346//////////////////////////////////////////////////////////////////////////////
    4447#include "MEnv.h"
     
    111114        return 0;
    112115
     116    const char *dir = gSystem->DirName(GetRcName());
     117
    113118    // Tokenize the array into single files divided by a whitespace
    114119    TObjArray *arr = incl.Tokenize(" ");
     
    123128    {
    124129        // Get file name to include
    125         const char *fenv = (*arr)[i]->GetName();
     130        TString fenv = (*arr)[i]->GetName();
     131
     132        // If the is not anabsolute path we prepend the dir-name
     133        // of the including file. This allows that includes
     134        // do not necessarily need absolute paths and paths are always
     135        // relative to the location of th eincluding file.
     136        if (!gSystem->IsAbsoluteFileName(fenv))
     137        {
     138            fenv.Prepend("/");
     139            fenv.Prepend(dir);
     140        }
    126141
    127142        // Read included file and check if its valid
Note: See TracChangeset for help on using the changeset viewer.