Skip to content

Commit 8ef2323

Browse files
set_image: Don't join path
1 parent ac7de35 commit 8ef2323

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ferrum-addon/addon.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export declare function save(): FerrumStatus
138138

139139
export declare function save_view_options(viewOptions: ViewOptions): void
140140

141-
export declare function set_image(index: number, pathStr: string): void
141+
export declare function set_image(index: number, path: string): void
142142

143143
export declare function set_image_data(index: number, bytes: ArrayBuffer): void
144144

src-native/tracks/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ pub fn get_image(index: u32, env: Env) -> Result<Option<JsImage>> {
207207

208208
#[napi(js_name = "set_image")]
209209
#[allow(dead_code)]
210-
pub fn set_image(index: u32, path_str: String, env: Env) -> Result<()> {
210+
pub fn set_image(index: u32, path: String, env: Env) -> Result<()> {
211211
let data: &mut Data = get_data(&env);
212-
let path = data.paths.get_track_file_path(&path_str);
213212
let tag = match &mut data.current_tag {
214213
Some(tag) => tag,
215214
None => bail!("No tag loaded"),

0 commit comments

Comments
 (0)