mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-17 15:14:48 +02:00
Fix corner square comparison (utf16Path.size() >= MAX_PATH - 12) instead
of (utf16Path.size() > MAX_PATH - 12). Detected by FileTest.testLongPath()
This commit is contained in:
parent
4156556e2e
commit
eab801f407
@ -442,7 +442,7 @@ void FileImpl::handleLastErrorImpl(const std::string& path)
|
||||
void FileImpl::convertPath(const std::string& utf8Path, std::wstring& utf16Path)
|
||||
{
|
||||
UnicodeConverter::toUTF16(utf8Path, utf16Path);
|
||||
if (utf16Path.size() > MAX_PATH - 12) // Note: CreateDirectory has a limit of MAX_PATH - 12 (room for 8.3 file name)
|
||||
if (utf16Path.size() >= MAX_PATH - 12) // Note: CreateDirectory has a limit of MAX_PATH - 12 (room for 8.3 file name)
|
||||
{
|
||||
if (utf16Path[0] == '\\' || utf16Path[1] == ':')
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user