Rename: the path length is checked on targets that are neither Unix nor Windows too (browser build)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Osvaldo Duran MelendezandClaude Sonnet 5.5 committed 2026-11-12 07:33:50 -05:00
1 parent 894fd5a25a
commit 440a7f89a2
1 file changed
+6 -1
+6 -1
View File
@@ -100,11 +100,16 @@ fn path_len(path: &Path) -> usize {
{
path.as_os_str().encode_wide().count()
}
#[cfg(not(windows))]
#[cfg(unix)]
{
use std::os::unix::ffi::OsStrExt;
path.as_os_str().as_bytes().len()
}
// Neither (the browser build): the encoded length, which only its tests see.
#[cfg(not(any(unix, windows)))]
{
path.as_os_str().len()
}
}
#[cfg(windows)]
use std::os::windows::ffi::OsStrExt;