Remove all uses of context stuff in os2

This commit is contained in:
gingerBill
2024-05-14 18:34:05 +01:00
parent 450b9ceaec
commit 453fc5182b
7 changed files with 57 additions and 47 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ package os2
import win32 "core:sys/windows"
import "base:runtime"
import "core:strings"
_Path_Separator :: '\\'
_Path_Separator_String :: "\\"
@@ -24,7 +23,7 @@ _mkdir_all :: proc(path: string, perm: File_Mode) -> Error {
fix_root_directory :: proc(p: string) -> (s: string, allocated: bool, err: runtime.Allocator_Error) {
if len(p) == len(`\\?\c:`) {
if is_path_separator(p[0]) && is_path_separator(p[1]) && p[2] == '?' && is_path_separator(p[3]) && p[5] == ':' {
s = strings.concatenate({p, `\`}, file_allocator()) or_return
s = concatenate({p, `\`}, file_allocator()) or_return
allocated = true
return
}