From 25e18b38b2b0507a5800ccb62db3e3e207d5f29e Mon Sep 17 00:00:00 2001 From: Alexander Arkhipov <119879895+drjfaust@users.noreply.github.com> Date: Sat, 31 Dec 2022 19:10:55 +0300 Subject: [PATCH] fix conversion of absolute path names --- src/platform_compat.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform_compat.cc b/src/platform_compat.cc index 1c704eb..55f5d96 100644 --- a/src/platform_compat.cc +++ b/src/platform_compat.cc @@ -295,11 +295,11 @@ void compat_windows_path_to_native(char* path) end = strchr(pch, '\0'); temp = *end; *end = '\0'; - if (pch == path && *pch != '/') + if (pch == path) d = opendir("."); else if (pch-1 == path && *(pch-1) == '/') d = opendir("/"); - else { + else if (pch > path) { char temp2 = *(pch-1); *(pch-1) = '\0'; d = opendir(path);