1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-14 03:23:29 +00:00

This was overkill

This commit is contained in:
Pavel Labath 2010-11-13 20:08:34 +01:00
parent 9d7a914515
commit f33c65aed2

View File

@ -4163,12 +4163,11 @@ void set_current_config() {
FILE *fp; FILE *fp;
/* Try to use personal config file first */ /* Try to use personal config file first */
std::string *buf = new std::string(to_real_path(CONFIG_FILE)); std::string buf = to_real_path(CONFIG_FILE);
if (!buf->empty() && (fp = fopen(buf->c_str(), "r"))) { if (!buf.empty() && (fp = fopen(buf.c_str(), "r"))) {
current_config = buf->c_str(); current_config = buf;
fclose(fp); fclose(fp);
} }
delete buf;
/* Try to use system config file if personal config not readable */ /* Try to use system config file if personal config not readable */
if (current_config.empty() && (fp = fopen(SYSTEM_CONFIG_FILE, "r"))) { if (current_config.empty() && (fp = fopen(SYSTEM_CONFIG_FILE, "r"))) {