mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-29 12:37:08 -06:00
Merge main into M13.1 (scripts in File ▸ Scripts / Window via @dynamic menu nodes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -310,6 +310,11 @@ fn native_file(_: &JsValue, args: &[JsValue], ctx: &mut Context) -> JsResult<JsV
|
||||
let path = arg_string(args, 1, ctx)?;
|
||||
let data = if args.len() > 2 { arg_string(args, 2, ctx)? } else { String::new() };
|
||||
let r: Result<J, String> = with_active(|a| {
|
||||
// File.execute(): opened with its default application through `file.executeFile`
|
||||
// (Allow Scripts to Write Files gate, Warn User When Executing Files confirmation).
|
||||
if op == "execute" {
|
||||
return exec(&mut a.session, "file.executeFile", json!({"path": path})).map(|v| json!(v.get("opened").is_some()));
|
||||
}
|
||||
let s = &a.session;
|
||||
match op.as_str() {
|
||||
"access" => Ok(json!(check_access(s, &path, false)?.exists())),
|
||||
|
||||
Reference in New Issue
Block a user