Skip to content

Commit

Permalink
Improve UNC path for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Jul 18, 2024
1 parent 4c8abea commit afc669c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/include/proxy/proxy_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3574,7 +3574,7 @@ R"x*x*x(<html>

std::wstring rpath;

if (fs::is_directory(item, ec))
if (fs::is_directory(unc_path.empty() ? item : unc_path, ec))
{
auto leaf = boost::nowide::narrow(item.filename().wstring());
leaf = leaf + "/";
Expand Down Expand Up @@ -3738,7 +3738,7 @@ R"x*x*x(<html>
auto [ftime, unc_path] = file_last_wirte_time(item);
obj["last_write_time"] = ftime;

if (fs::is_directory(item, ec))
if (fs::is_directory(unc_path.empty() ? item : unc_path, ec))
{
auto leaf = boost::nowide::narrow(item.filename().wstring());
obj["filename"] = leaf;
Expand Down

0 comments on commit afc669c

Please sign in to comment.