SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,30 @@
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;
@@ -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;
}