Logo Search packages:      
Sourcecode: xd version File versions  Download package

sethome.cc

#include "alternatives.ih"

void Alternatives::setHome() 
{
    char *cp = getenv("HOME");              // determine the homedir

    if (!cp)                                // save it
        d_homeDir = '/';
    else
    {
        d_homeDir = cp;
        if (*d_homeDir.rbegin() != '/')
            d_homeDir += '/';
    }
    // home set with ending /

    msg() << "Home directory: " << d_homeDir << info;
}

Generated by  Doxygen 1.6.0   Back to index