Changeset 17375 for trunk


Ignore:
Timestamp:
11/25/13 19:50:31 (11 years ago)
Author:
tbretz
Message:
Handle the case when /home/fact is not defined, this can happen for example when the web user calls dimctrl via php exec()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r17362 r17375  
    112112            if (access(prgpath.empty() ? "." : prgpath.c_str(), W_OK))
    113113            {
    114                 path  = conf.Get<string>("home");
    115                 path /= ".fact++";
     114                path = ".";
     115
     116                if (conf.Has("home"))
     117                {
     118                    path  = conf.Get<string>("home");
     119                    path /= ".fact++";
     120                }
    116121            }
    117122        }
     
    149154#endif
    150155            if (!wout.OpenLogFile((path/file).string(), conf.Get<bool>("append-log")))
    151                 win << kYellow << "WARNING - Couldn't open log-file " << path.string() << ": " << strerror(errno) << endl;
     156                win << kYellow << "WARNING - Couldn't open log-file " << (path/file).string() << ": " << strerror(errno) << endl;
    152157        }
    153158
Note: See TracChangeset for help on using the changeset viewer.