Minor changes to os2

This commit is contained in:
gingerBill
2024-02-17 13:41:54 +00:00
parent c5c2a4d09d
commit fa1875a8f1
5 changed files with 55 additions and 3 deletions
+4
View File
@@ -31,6 +31,8 @@ _mkdir_all :: proc(path: string, perm: File_Mode) -> Error {
return p, false, nil
}
_TEMP_ALLOCATOR_GUARD()
dir, err := stat(path, _temp_allocator())
if err == nil {
if dir.is_directory {
@@ -125,6 +127,8 @@ _fix_long_path_internal :: proc(path: string) -> string {
return path
}
_TEMP_ALLOCATOR_GUARD()
PREFIX :: `\\?`
path_buf := make([]byte, len(PREFIX)+len(path)+1, _temp_allocator())
copy(path_buf, PREFIX)