Bugfix: image extenstion to png

This commit is contained in:
Piyush मिश्रः 2022-01-14 13:08:17 +05:30
parent 303aad16db
commit f1c90e3a6f
1 changed files with 8 additions and 5 deletions

View File

@ -159,11 +159,14 @@ impl ImageContainer {
None => return, None => return,
}; };
let path_conf = path_original.with_extension("conf"); let path_conf = path_original.with_extension("conf");
let export = path_original let export = path_original.parent().unwrap().join("export").join(
.parent() path_original
.unwrap() .with_extension("png")
.join("export") .file_name()
.join(path_original.file_name().unwrap().to_str().unwrap()); .unwrap()
.to_str()
.unwrap(),
);
fs::write(&path_conf, serde_json::to_string(&*prop).unwrap()).unwrap(); fs::write(&path_conf, serde_json::to_string(&*prop).unwrap()).unwrap();