summaryrefslogtreecommitdiff
path: root/src/commands/io.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
committerfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
commit3e65975227baa511f570e8223fccda5607cf905e (patch)
treef852fd5cc3b26a004cf7bfab054e86c0d74c4669 /src/commands/io.rs
parent416f4dc383ff5a1194da3a5532a8e159a4a1dac0 (diff)
downloadmodlist-3e65975227baa511f570e8223fccda5607cf905e.tar
modlist-3e65975227baa511f570e8223fccda5607cf905e.tar.gz
modlist-3e65975227baa511f570e8223fccda5607cf905e.zip
added config argument, remove devdir
Diffstat (limited to 'src/commands/io.rs')
-rw-r--r--src/commands/io.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/commands/io.rs b/src/commands/io.rs
index 7f03eec..82b30ce 100644
--- a/src/commands/io.rs
+++ b/src/commands/io.rs
@@ -5,7 +5,6 @@ use std::io::prelude::*;
5use crate::{ 5use crate::{
6 config::Cfg, 6 config::Cfg,
7 db::{lists_get, lists_get_all_ids, lists_insert, userlist_get_all_ids}, 7 db::{lists_get, lists_get_all_ids, lists_insert, userlist_get_all_ids},
8 devdir,
9 error::MLE, 8 error::MLE,
10 mod_add, IDSelector, List, Modloader, 9 mod_add, IDSelector, List, Modloader,
11}; 10};
@@ -61,9 +60,7 @@ pub fn export(config: Cfg, list: Option<String>) -> MLE<()> {
61 60
62 let filestr = dirs::home_dir().unwrap().join("mlexport.toml"); 61 let filestr = dirs::home_dir().unwrap().join("mlexport.toml");
63 62
64 let mut file = File::create(devdir( 63 let mut file = File::create(filestr.into_os_string().into_string().unwrap().as_str())?;
65 filestr.into_os_string().into_string().unwrap().as_str(),
66 ))?;
67 file.write_all(toml.as_bytes())?; 64 file.write_all(toml.as_bytes())?;
68 65
69 Ok(()) 66 Ok(())