mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
replace path entities from filename
This commit is contained in:
parent
6e7a1d51e5
commit
80684e0316
1 changed files with 5 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ use gtk::{
|
|||
prelude::{ButtonExt, FileExt, OutputStreamExtManual, WidgetExt},
|
||||
Button, FileDialog, FileFilter, Window,
|
||||
};
|
||||
use std::rc::Rc;
|
||||
use std::{path::MAIN_SEPARATOR, rc::Rc};
|
||||
|
||||
const LABEL: &str = "Export";
|
||||
const TOOLTIP_TEXT: &str = "Export selected identity to file";
|
||||
|
|
@ -62,7 +62,10 @@ impl Save {
|
|||
FileDialog::builder()
|
||||
.default_filter(&filter_pem)
|
||||
.filters(&filters)
|
||||
.initial_name(format!("{}.pem", certificate.name))
|
||||
.initial_name(format!(
|
||||
"{}.pem",
|
||||
certificate.name.replace(MAIN_SEPARATOR, "-")
|
||||
))
|
||||
.build()
|
||||
.save(Window::NONE, Cancellable::NONE, {
|
||||
let button = button.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue