-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Milestone
Description
Describe the bug
Poco::File f1("C:");
Poco::File f2("\\\\?\\C:"); // long path
bool b1 = f1.exists(); // ok
bool b2 = f2.exists(); // crash !!!!!!
std::string path = "C:\\abc\\def\\"; // folder [abc] and [def] are all not exists
Poco::File f3("\\\\?\\" + path); // long path
Poco::File f4(path);
f3.createDirectories(); // crash !!!!!!
f4.createDirectories(); // ok
Error occured here
poco/Foundation/src/File_WIN32U.cpp
Line 110 in 5886ee8
DWORD attr = GetFileAttributesW(_upath.c_str()); |
DWORD dw1 = GetFileAttributesW(L"C:"); // dw1 = 0x10
DWORD dw2 = GetFileAttributesW(L"C:\\"); // dw2 = 0x16
DWORD dw3 = GetFileAttributesW(L"\\\\?\\C:\\"); // dw3 = 0x16
// Poco::File error here
DWORD dw4 = GetFileAttributesW(L"\\\\?\\C:"); // dw4 = -1, GetLastError = ERROR_INVALID_PARAMETER
Please add relevant environment information:
- Visual studio 2022
- POCO v1.14.2
Metadata
Metadata
Assignees
Labels
No labels