$OpenBSD: patch-src_interface_file_utils_cpp,v 1.6 2021/03/16 13:02:33 bket Exp $
Index: src/interface/file_utils.cpp
--- src/interface/file_utils.cpp.orig
+++ src/interface/file_utils.cpp
@@ -8,9 +8,9 @@
 #include <shlobj.h>
 #include <shlwapi.h>
 #else
+#include <glob.h>
 #include <wx/mimetype.h>
 #include <wx/textfile.h>
-#include <wordexp.h>
 #endif
 
 #include "Options.h"
@@ -391,12 +391,12 @@ wxString ShellUnescape(wxString const& path)
 
 	const wxWX2MBbuf buf = path.mb_str();
 	if (buf && *buf) {
-		wordexp_t p;
-		int res = wordexp(buf, &p, WRDE_NOCMD);
-		if (!res && p.we_wordc == 1 && p.we_wordv) {
-			ret = wxString(p.we_wordv[0], wxConvLocal);
+		glob_t p;
+		int res = glob( buf, GLOB_ERR, NULL, &p );
+		if( !res && p.gl_pathc == 1 && p.gl_pathv ) {
+			ret = wxString(p.gl_pathv[0], wxConvLocal);
 		}
-		wordfree(&p);
+		globfree(&p);
 	}
 	return ret;
 }
