Add validation to textarea
This commit is contained in:
@@ -50,7 +50,7 @@ impl ApplicationConfig {
|
||||
conf
|
||||
}
|
||||
|
||||
pub fn write_to_file(self, path: &PathBuf) -> Result<()> {
|
||||
fn write_to_file(self, path: &PathBuf) -> Result<()> {
|
||||
let mut conf = Ini::new();
|
||||
conf.with_section(Some("Basic"))
|
||||
.set("DBPath", self.basic_config.db_path)
|
||||
@@ -67,4 +67,8 @@ impl ApplicationConfig {
|
||||
conf.write_to_file(path)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn save(&self) -> Result<()> {
|
||||
self.clone().write_to_file(&APP_CONIFG_FILE_PATH.to_path_buf())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user