Commit Graph
946 Commits
Author SHA1 Message Date
gingerBill 0ad99cacde Merge pull request #7590 from ARTurleite6/fix/windows-long-path-temp-guard
core/os: allocate the long-path buffer in the caller's allocator
2026-09-30 11:19:09 +01:00
bplu4t2f 36c1173df6 Fix #7547 2026-09-21 17:52:49 +02:00
Yawning Angel 389dd7d925 core/os/env_linux: Fix the 0th env var being duplicated 2026-09-20 08:35:02 +09:00
Artur Leite 4aa73f6c10 core/os: allocate the long-path buffer in the caller's allocator
`_fix_long_path_internal` built the `\\?\` prefixed path in an arena it guarded
itself, so `TEMP_ALLOCATOR_GUARD`'s deferred end rewound that arena as the proc
returned and `_fix_long_path`/`_fix_long_path_slice` converted memory that had
already been reclaimed. Paths of 248 bytes or more reached the conversion as
released storage whenever long path support was unavailable.

Take the scratch allocator as a parameter and let the two callers guard it, as
they already receive the destination allocator and can exclude it from the
collision list.
2026-09-18 10:52:26 +02:00
Laytan Laats 3fb6d8965b [core:os] add device to File_Info 2026-08-26 20:44:01 +02:00
Thomas Skarshaug 9e1e7d60c9 Fix simple typo in process.odin 2026-08-25 21:49:11 +02:00
Jeroen van Rijn ce379d033a Deprecate core:os/old as advertised. 2026-08-23 21:42:58 +02:00
Jeroen van Rijn a9b7d3dfc6 Fix #7350 2026-08-16 18:08:17 +02:00
Victor Mororó 7ff00d39bd os: resolve relative path before SHFileOperationW in remove_all (windows) 2026-08-05 08:45:01 -03:00
gingerBill 6c2bb94ceb Merge pull request #7206 from ssenthilnathan3/fix/os-glob-clone
Fix os.glob not cloning pattern when no meta characters present
2026-08-04 10:52:43 +02:00
Senthilnathan b838b1bf25 fixes os.glob not cloning pattern when no meta characters present 2026-08-04 12:19:03 +05:30
corley e3185f0c44 fix file open emulating posix open on mode/perm mismatch on windows 2026-07-21 11:58:48 +03:00
Jeroen van Rijn 1d226a30e4 Fix is_tty doc string 2026-07-07 23:28:26 +02:00
gingerBill dc7cfbf443 Merge pull request #6671 from MaierN/master
fix memory leak and inconsistency in os.read_entire_file_from_file
2026-06-23 12:20:36 +01:00
jason 57b63263b3 get .MODE and .TYPE right 2026-05-12 18:53:39 -04:00
jason bb9cddabac linux.Stat -> linux.Statx
This provides access to os.Stat.creation_time for Linux.
Added a cast to string_interner.cpp for 32-bit compiles.
2026-05-12 18:24:08 -04:00
Nicolas Maier d2fafbb251 fix: handle allocator errors in os.read_entire_file_from_file 2026-05-10 17:20:22 +02:00
gingerBill d21fea404b Merge pull request #6631 from heavyrain266/deprecate-haiku
removed Haiku from supported targets
2026-05-06 15:52:36 +01:00
gingerBill 560f8847c7 Merge pull request #6651 from IllusionMan1212/os-fixes
os fixes
2026-05-04 19:55:04 +01:00
IllusionMan1212 bda83a7c36 fix(os): create all dst directories in copy_directory_all 2026-05-04 01:26:23 +02:00
IllusionMan1212 a1a7da6f8a fix(os): store absolute path on File_Info on Windows, matching Linux
fixes #6170
2026-05-04 01:25:19 +02:00
Ignacy Koper c01e85ca67 removed core:sys/haiku package
also removes Haiku from core:sys/info, core:os/old, core:path/filepath, core:dynlib, core:time, core:testing, and core:terminal (minor changes)

Signed-off-by: Ignacy Koper <ignacy423@gmail.com>
2026-04-28 19:27:24 +02:00
Ignacy Koper 3e64a72bad removed Essence from supported targets
Signed-off-by: Ignacy Koper <ignacy423@gmail.com>
2026-04-27 11:10:48 +02:00
juaum 7e4240a460 Fix os.stem on empty path 2026-04-16 15:11:40 +02:00
Shane Shrybman f4aa97f89a Fix os._volume_name_len to handle paths of purely separators. Also, fix '\h\s' handling 2026-04-09 23:26:37 -04:00
Jeroen van Rijn e558f9852e Add comment to os.exit 2026-04-08 10:17:43 +02:00
juaum d06572c831 core/os: Add dir procedure 2026-04-04 10:13:19 +02:00
imp0s5ible 0d8fe07388 Fix array-bounds-exceeded error
We didn't consider empty base/target strings and accessed the ith
element unconditionally. We now check to make sure `i` is in range.
2026-03-29 21:24:57 +02:00
imp0s5ible 1f2d978396 Fix #6495 - Handle starting separator during name comparison
During the loop comparing file/directory names, the starting character
in both will be a path separator in most cases.
Since a naive string equality will regard forward slashes and
backslashes as different, we must specially handle the first character
and exclude it from the equality comparison if necessary.
2026-03-29 21:11:22 +02:00
pawelt 911f00521c Handle OOM error in path_linux / _get_working_directory() 2026-03-17 14:37:22 +01:00
gingerBill 20dcc8fd80 Remove use of @(init) for checking if Windows has long path support and check on first usage instead 2026-03-15 19:09:45 +00:00
IllusionMan1212 afbb0b4357 os: return .Permission_Denied for .EACCES in posix and linux 2026-03-03 17:50:31 +02:00
gingerBill aea6274a10 Fix _mkdir_all for wasi 2026-02-19 14:54:34 +00:00
gingerBill b643b0b1a9 Fix _copy_directory_all_native 2026-02-19 14:05:49 +00:00
gingerBill cf3ac07a7e Fix copy_directory_all 2026-02-19 14:00:38 +00:00
gingerBill 26a4b2bfef Fix perm: int to perm: Permissions 2026-02-19 13:58:02 +00:00
Laytan Laats 7a7d7560b6 os: remove sys/unix dep on Linux 2026-02-18 20:16:55 +01:00
Laytan Laats e87e3fba1b os: remove process_close and add process_terminate
`process_wait` (optionally prefaced with a `process_kill`) can be used
to properly close and free resources of the process.

`process_terminate` was added because `process_kill` is a forceful
exit, we were missing a way to request the process to terminate.
2026-02-18 20:15:07 +01:00
gingerBill 442b163871 Fix typos 2026-02-17 14:41:09 +00:00
gingerBill 966b76c4cb Add write_slice/read_slice utility procedures to core:bytes, core:io, and core:os 2026-02-17 14:34:28 +00:00
Jeroen van Rijn 95c82e0f76 Fix #6279
If the replacement rune was multi-byte, `os.replace_path_separators` would silently fail to replace anything.

Now it properly handles non-ASCII separator. Additionally added a fast path for when all runes in the input path as well as the replacement separator are simple ASCII.

Test added.
2026-02-15 12:42:55 +01:00
Jeroen van Rijn d26ad6a0e5 Update doc line for core:os and core:os/old. 2026-02-14 00:55:21 +01:00
Jeroen van Rijn faca11d593 Fix os.stem, os.short_stem. 2026-02-13 12:36:15 +01:00
Jeroen van Rijn 62cfa9e8e3 Narrowly tailor panic. 2026-02-12 12:21:01 +01:00
Jeroen van Rijn 658e6b9d9f Add core:log support for js/wasm
Also add #panic when importing `core:os` on wasm.
2026-02-12 12:12:21 +01:00
Jeroen van Rijn 97683ae014 Simplify 2026-02-12 10:48:26 +01:00
Jeroen van Rijn 8468d269dc Remove @(require_results) from os.read_directory_iterator 2026-02-11 19:15:32 +01:00
Jeroen van Rijn 1a37f4eb0c Only count bits in touched array members. 2026-02-09 19:13:32 +01:00
Jeroen van Rijn 454ad1f4b8 Unwrap cpu affinity syscalls. 2026-02-09 19:01:43 +01:00
Jeroen van Rijn fa44c64c42 != nil 2026-02-09 18:29:31 +01:00