Skip to content

Commit ffaaf93

Browse files
committed
VSIMkdirRecursive(): fix 1fc62d7 (master only)
1 parent d1f0659 commit ffaaf93

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

port/cpl_vsil.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,12 @@ int VSIMkdirRecursive(const char *pszPathname, long mode)
647647
if (!pszPathname)
648648
return -1;
649649

650-
const std::string osPathnameOri(VSIFileManager::GetHandler(pszPathname)
651-
->GetCanonicalFilename(pszPathname));
650+
std::string osPathnameOri(pszPathname);
651+
if (cpl::starts_with(osPathnameOri, "/vsimem/"))
652+
{
653+
osPathnameOri = VSIFileManager::GetHandler(pszPathname)
654+
->GetCanonicalFilename(osPathnameOri);
655+
}
652656
// Limit to avoid performance issues such as in
653657
// https://issues.oss-fuzz.com/issues/471096341
654658
constexpr size_t CPL_MAX_PATH = 4096;

0 commit comments

Comments
 (0)