mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
cat: add WASI stub for is_unsafe_overwrite and add to feat_wasm
WASI has no fstat-based device/inode checks, so always return false (assume safe) for the overwrite detection.
This commit is contained in:
committed by
Daniel Hofstetter
parent
f0c23247ba
commit
e510449dce
@@ -184,6 +184,7 @@ feat_wasm = [
|
||||
"base32",
|
||||
"base64",
|
||||
"basenc",
|
||||
"cat",
|
||||
"cut",
|
||||
"ls",
|
||||
"date",
|
||||
|
||||
@@ -9,6 +9,12 @@ pub use self::unix::is_unsafe_overwrite;
|
||||
#[cfg(windows)]
|
||||
pub use self::windows::is_unsafe_overwrite;
|
||||
|
||||
// WASI: no fstat-based device/inode checks available; assume safe.
|
||||
#[cfg(target_os = "wasi")]
|
||||
pub fn is_unsafe_overwrite<I, O>(_input: &I, _output: &O) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
mod unix;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user