fix
This commit is contained in:
		
							
								
								
									
										6
									
								
								support/3rd_party/src/utils/path.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								support/3rd_party/src/utils/path.cpp
									
									
									
									
										vendored
									
									
								
							@@ -36,7 +36,7 @@ static const std::wstring directory_seperator_str_w{
 | 
				
			|||||||
} // namespace
 | 
					} // namespace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace repertory::utils::path {
 | 
					namespace repertory::utils::path {
 | 
				
			||||||
inline auto absolute(std::string_view path) -> std::string {
 | 
					auto absolute(std::string_view path) -> std::string {
 | 
				
			||||||
  std::string abs_path{path};
 | 
					  std::string abs_path{path};
 | 
				
			||||||
#ifdef _WIN32
 | 
					#ifdef _WIN32
 | 
				
			||||||
  if (not abs_path.empty() && ::PathIsRelative(abs_path.c_str())) {
 | 
					  if (not abs_path.empty() && ::PathIsRelative(abs_path.c_str())) {
 | 
				
			||||||
@@ -57,7 +57,7 @@ inline auto absolute(std::string_view path) -> std::string {
 | 
				
			|||||||
      } else if (tmp == ".") {
 | 
					      } else if (tmp == ".") {
 | 
				
			||||||
        found = true;
 | 
					        found = true;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        tmp = dirname(tmp.c_str());
 | 
					        tmp = dirname(tmp.data());
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    } while (not found);
 | 
					    } while (not found);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -66,7 +66,7 @@ inline auto absolute(std::string_view path) -> std::string {
 | 
				
			|||||||
  return finalize(abs_path);
 | 
					  return finalize(abs_path);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline auto absolute(std::wstring_view path) -> std::wstring {
 | 
					auto absolute(std::wstring_view path) -> std::wstring {
 | 
				
			||||||
  return utils::string::from_utf8(absolute(utils::string::to_utf8(path)));
 | 
					  return utils::string::from_utf8(absolute(utils::string::to_utf8(path)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user