Index: src/commonui/fz_paths.cpp
--- src/commonui/fz_paths.cpp.orig
+++ src/commonui/fz_paths.cpp
@@ -15,7 +15,7 @@
 	#include <objbase.h>
 #else
 	#include <unistd.h>
-	#include <wordexp.h>
+	#include <glob.h>
 #endif
 
 using namespace std::literals;
@@ -498,12 +498,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;
 }
