mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Make os.get_current_directory no longer strip the zero at the end of the resulting string, as it no longer should occur.
This commit is contained in:
@@ -282,8 +282,7 @@ get_current_directory :: proc() -> string {
|
|||||||
|
|
||||||
intrinsics.atomic_store(&cwd_gate, false);
|
intrinsics.atomic_store(&cwd_gate, false);
|
||||||
|
|
||||||
dir_utf8 := win32.utf16_to_utf8(dir_buf_wstr);
|
return win32.utf16_to_utf8(dir_buf_wstr);
|
||||||
return dir_utf8[:len(dir_utf8)-1]; // NOTE(tetra): Remove the NUL.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_current_directory :: proc(path: string) -> (err: Errno) {
|
set_current_directory :: proc(path: string) -> (err: Errno) {
|
||||||
|
|||||||
Reference in New Issue
Block a user