diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c index d996a6b738..a4df1480ac 100644 --- a/legacy/efreet/src/lib/efreet_base.c +++ b/legacy/efreet/src/lib/efreet_base.c @@ -21,6 +21,7 @@ void *alloca (size_t); #endif #include +#include #ifdef _WIN32 # include @@ -524,9 +525,16 @@ efreet_user_dir_get(const char *key, const char *fallback) if (!eq) continue; if (strncmp(key, line->start, eq - line->start)) continue; if (++eq >= line->end) continue; - if (*eq != '"') continue; - if (++eq >= line->end) continue; - end = memchr(eq, '"', line->end - eq); + if (*eq == '"') + { + if (++eq >= line->end) continue; + end = memchr(eq, '"', line->end - eq); + } + else + { + end = line->end; + while (isspace(*end)) end--; + } if (!end) continue; ret = alloca(end - eq + 1); memcpy(ret, eq, end - eq);