Fix os2.clean_path on Windows

This commit is contained in:
Jeroen van Rijn
2025-05-11 15:35:52 +02:00
parent ecd0655ba2
commit 30388cada3
5 changed files with 108 additions and 65 deletions
+5 -1
View File
@@ -187,7 +187,6 @@ init_long_path_support :: proc() {
if value == 1 {
can_use_long_paths = true
}
}
@(require_results)
@@ -271,6 +270,11 @@ _clean_path_handle_start :: proc(path: string, buffer: []u8) -> (rooted: bool, s
start += 1
}
copy(buffer, path[:start])
for n in 0..<start {
if _is_path_separator(buffer[n]) {
buffer[n] = _Path_Separator
}
}
}
return
}