From 7e4d2e370e921093e7ccee9ab2ef595da2265859 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Thu, 25 May 2023 06:22:00 +0200 Subject: [PATCH] Fix error when stdlib not available --- src/std_fns.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std_fns.rs b/src/std_fns.rs index 95a0cd9..b7e05f8 100644 --- a/src/std_fns.rs +++ b/src/std_fns.rs @@ -634,7 +634,7 @@ pub fn import(stack: &mut Stack) -> OError { } if stack.include_file( &(*fs::canonicalize(s.clone()) - .map_err(|x| stack.error(ErrorKind::IO(x.to_string() + " (opening " + &s + ")")))? + .unwrap_or_else(|_| s.clone().into()) .as_os_str() .to_string_lossy()) .to_owned(),