fix(ui): write a plugin's offered file through the confined file helper (#1960)

This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-11-03 22:59:02 -05:00
1 parent bcc611b3a9
commit c1dfa9ecee
1 file changed
+1 -1
+1 -1
View File
@@ -138,7 +138,7 @@ pub(crate) fn save_file(app: &mut FigApp, data: &Value) {
let shown = name.clone();
app.pick_save(tr("Save file"), &name, &exts, move |app, path| {
let file = path.file_name().map(|f| f.to_string_lossy().to_string()).unwrap_or(shown);
match std::fs::write(&path, &bytes) {
match figcraft_engine::file_access::write(&path, &bytes) {
Ok(()) => app.toast(trf("Saved {name}", &[("name", &file)])),
Err(_) => app.toast(tr("Couldn't save the file")),
}