This commit is contained in:
parent
d659a5e04d
commit
df24b99303
2
support/3rd_party/src/utils/path.cpp
vendored
2
support/3rd_party/src/utils/path.cpp
vendored
@ -42,6 +42,7 @@ static const std::wstring directory_seperator_str_w{
|
|||||||
|
|
||||||
#if defined(HAS_WORDEXP_H)
|
#if defined(HAS_WORDEXP_H)
|
||||||
try {
|
try {
|
||||||
|
if (not path.empty()) {
|
||||||
wordexp_t wt{};
|
wordexp_t wt{};
|
||||||
int ret{};
|
int ret{};
|
||||||
if ((ret = wordexp(path.c_str(), &wt, 0)) != 0) {
|
if ((ret = wordexp(path.c_str(), &wt, 0)) != 0) {
|
||||||
@ -51,6 +52,7 @@ static const std::wstring directory_seperator_str_w{
|
|||||||
|
|
||||||
path = wt.we_wordv[0U];
|
path = wt.we_wordv[0U];
|
||||||
wordfree(&wt);
|
wordfree(&wt);
|
||||||
|
}
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
repertory::utils::error::handle_exception(function_name, e);
|
repertory::utils::error::handle_exception(function_name, e);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user