Switch to unified view

a/upmpd/upmpd.cxx b/upmpd/upmpd.cxx
...
...
337
        cachedir = "/var/cache/upmpdcli";
337
        cachedir = "/var/cache/upmpdcli";
338
    } else {
338
    } else {
339
        cachedir = path_cat(path_tildexpand("~") , "/.cache/upmpdcli");
339
        cachedir = path_cat(path_tildexpand("~") , "/.cache/upmpdcli");
340
    }
340
    }
341
341
342
  string mcfn;
343
  if (ohmetapersist) {
342
    string mcfn = path_cat(cachedir, "/metacache");
344
      mcfn = path_cat(cachedir, "/metacache");
343
    if (!path_makepath(cachedir, 0755)) {
345
     if (!path_makepath(cachedir, 0755)) {
344
        LOGERR("makepath("<< cachedir << ") : errno : " << errno << endl);
346
         LOGERR("makepath("<< cachedir << ") : errno : " << errno << endl);
345
  } else {
346
      int fd;
347
      if ((fd = open(mcfn.c_str(), O_CREAT|O_RDWR, 0644)) < 0) {
348
          LOGERR("creat("<< mcfn << ") : errno : " << errno << endl);
349
        } else {
347
        } else {
348
          int fd;
349
          if ((fd = open(mcfn.c_str(), O_CREAT|O_RDWR, 0644)) < 0) {
350
              LOGERR("creat("<< mcfn << ") : errno : " << errno << endl);
351
          } else {
350
            close(fd);
352
             close(fd);
351
            if (geteuid() == 0 && chown(mcfn.c_str(), runas, -1) != 0) {
353
             if (geteuid() == 0 && chown(mcfn.c_str(), runas, -1) != 0) {
352
                LOGERR("chown("<< mcfn << ") : errno : " << errno << endl);
354
                 LOGERR("chown("<< mcfn << ") : errno : " << errno << endl);
355
              }
353
            }
356
            }
354
        }
357
        }
355
    }
358
    }
356
    
359
    
357
    if ((op_flags & OPT_D)) {
360
    if ((op_flags & OPT_D)) {