Begin mapping os.Error in the rest of the codebase
This commit is contained in:
1 parent
1d75a612d5
commit
97c499dbb4
18 files changed
+231
-222
No files matched your search
@@ -63,17 +63,17 @@ temp_full_path :: proc(name: string) -> (path: string, err: os.Error) {
|
||||
p := win32.utf8_to_utf16(name, ta)
|
||||
n := win32.GetFullPathNameW(raw_data(p), 0, nil, nil)
|
||||
if n == 0 {
|
||||
return "", os.Platform_Error(win32.GetLastError())
|
||||
return "", os.get_last_error()
|
||||
}
|
||||
|
||||
buf := make([]u16, n, ta)
|
||||
n = win32.GetFullPathNameW(raw_data(p), u32(len(buf)), raw_data(buf), nil)
|
||||
if n == 0 {
|
||||
delete(buf)
|
||||
return "", os.Platform_Error(win32.GetLastError())
|
||||
return "", os.get_last_error()
|
||||
}
|
||||
|
||||
return win32.utf16_to_utf8(buf[:n], ta) or_else "", os.ERROR_NONE
|
||||
return win32.utf16_to_utf8(buf[:n], ta)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user