SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
30
net/filezilla/patches/patch-src_commonui_fz_paths_cpp
Normal file
30
net/filezilla/patches/patch-src_commonui_fz_paths_cpp
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue