mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fixed ftp bug
Fixed ftp bug
This commit is contained in:
parent
7b37194a48
commit
fbf5b68d6f
1 changed files with 9 additions and 1 deletions
10
src/util.cc
10
src/util.cc
|
@ -675,7 +675,15 @@ string normalize_path(std::string_view path)
|
|||
if (0 == path.compare(zeek::detail::ScannedFile::canonical_stdin_path)) {
|
||||
return string(path);
|
||||
}
|
||||
return std::filesystem::canonical(path).string();
|
||||
string stringPath = string(path);
|
||||
|
||||
// "//" interferes with std::weakly_canonical
|
||||
if (stringPath._Starts_with("//"))
|
||||
{
|
||||
stringPath.erase(0, 2);
|
||||
}
|
||||
|
||||
return std::filesystem::weakly_canonical(path).string();
|
||||
#else
|
||||
if ( path.find("/.") == std::string_view::npos && path.find("//") == std::string_view::npos )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue