From 126d23ddda95bf7a05b33c3994520a567b7ff929 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 26 Nov 2025 10:12:27 +0100 Subject: [PATCH] Fix range sendFile() for MinGW Since toNativePath() returns std::string for MinGW win32, we end up in an infinite loop. --- trantor/net/inner/TcpConnectionImpl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trantor/net/inner/TcpConnectionImpl.cc b/trantor/net/inner/TcpConnectionImpl.cc index b786c762..04cfbd27 100644 --- a/trantor/net/inner/TcpConnectionImpl.cc +++ b/trantor/net/inner/TcpConnectionImpl.cc @@ -554,7 +554,7 @@ void TcpConnectionImpl::sendFile(const char *fileName, { assert(fileName); #ifdef _WIN32 - sendFile(utils::toNativePath(fileName).c_str(), offset, length); + sendFile(utils::toWidePath(fileName).c_str(), offset, length); #else // _WIN32 auto fileNode = BufferNode::newFileBufferNode(fileName, offset, length);