Switch to unified view

a/src/main.cxx b/src/main.cxx
...
...
152
152
153
// Static for cleanup in sig handler.
153
// Static for cleanup in sig handler.
154
static UpnpDevice *dev;
154
static UpnpDevice *dev;
155
155
156
string g_datadir(DATADIR "/");
156
string g_datadir(DATADIR "/");
157
string g_cachedir("/var/cache/upmpdcli");
157
158
158
// Global
159
// Global
159
string g_configfilename;
160
string g_configfilename;
160
ConfSimple *g_config;
161
ConfSimple *g_config;
161
bool g_enableL16 = false;
162
bool g_enableL16 = false;
...
...
497
            opts.cachedir = "/var/cache/upmpdcli";
498
            opts.cachedir = "/var/cache/upmpdcli";
498
    } else {
499
    } else {
499
    if (opts.cachedir.empty())
500
    if (opts.cachedir.empty())
500
            opts.cachedir = path_cat(path_tildexpand("~") , "/.cache/upmpdcli");
501
            opts.cachedir = path_cat(path_tildexpand("~") , "/.cache/upmpdcli");
501
    }
502
    }
502
503
    g_cachedir = opts.cachedir;
504
    
503
    string& mcfn = opts.cachefn;
505
    string& mcfn = opts.cachefn;
504
    // no cache access needed or desirable for a pure media server
506
    // no cache access needed or desirable for a pure media server
505
    if (!msonly && ohmetapersist) {
507
    if (!msonly && ohmetapersist) {
506
        opts.cachefn = path_cat(opts.cachedir, "/metacache");
508
        opts.cachefn = path_cat(opts.cachedir, "/metacache");
507
        if (!path_makepath(opts.cachedir, 0755)) {
509
        if (!path_makepath(opts.cachedir, 0755)) {