Index: src/commonui/fz_paths.cpp --- src/commonui/fz_paths.cpp.orig +++ src/commonui/fz_paths.cpp @@ -15,7 +15,7 @@ #include #else #include - #include + #include #endif using namespace std::literals; @@ -491,12 +491,12 @@ std::string ShellUnescape(std::string const& path) { std::string ret; - wordexp_t p; - int res = wordexp(path.c_str(), &p, WRDE_NOCMD); - if (!res && p.we_wordc == 1 && p.we_wordv) { - ret = p.we_wordv[0]; + glob_t p; + int res = glob( path.c_str(), GLOB_ERR, NULL, &p ); + if( !res && p.gl_pathc == 1 && p.gl_pathv ) { + ret = p.gl_pathv[0]; } - wordfree(&p); + globfree(&p); return ret; }