X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=util%2Fepist%2Fepist.cc;fp=util%2Fepist%2Fepist.cc;h=a5b829b0063bb29133aa9ceea8df067831aa2455;hb=544da8c704c14f2fd2533711dbf710c34d873e32;hp=a0b1666a2dfd70cb13a2c402eda6727095bae652;hpb=13cf497f83b3f37df2d044bd138db9f776a077f1;p=chaz%2Fopenbox diff --git a/util/epist/epist.cc b/util/epist/epist.cc index a0b1666a..a5b829b0 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -41,6 +41,16 @@ extern "C" { #ifdef HAVE_LIBGEN_H # include #endif // HAVE_LIBGEN_H + +#ifdef HAVE_UNISTD_H +# include +# include +#endif // HAVE_UNISTD_H + +#ifdef HAVE_SYS_STAT_H +# include +# include +#endif // HAVE_SYS_STAT_H } #include @@ -66,7 +76,12 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) if (rc_file) _rc_file = rc_file; else - _rc_file = expandTilde("~/.epistrc"); + _rc_file = expandTilde("~/.openbox/epistrc"); + + struct stat buf; + if (0 != stat(_rc_file.c_str(), &buf) || + !S_ISREG(buf.st_mode)) + _rc_file = DEFAULTRC; _xatom = new XAtom(getXDisplay());