summaryrefslogtreecommitdiff
path: root/src/commands/io.rs
diff options
context:
space:
mode:
authorfx <[email protected]>2023-04-23 21:57:09 +0200
committerfx <[email protected]>2023-04-23 21:57:09 +0200
commit99c84b5a81f395f4f094b157019e84bfc4459df6 (patch)
treef852fd5cc3b26a004cf7bfab054e86c0d74c4669 /src/commands/io.rs
parent416f4dc383ff5a1194da3a5532a8e159a4a1dac0 (diff)
parent3e65975227baa511f570e8223fccda5607cf905e (diff)
downloadmodlist-99c84b5a81f395f4f094b157019e84bfc4459df6.tar
modlist-99c84b5a81f395f4f094b157019e84bfc4459df6.tar.gz
modlist-99c84b5a81f395f4f094b157019e84bfc4459df6.zip
Merge pull request 'added config argument, remove devdir' (#2) from dev into cache
Reviewed-on: http://raspberrypi.fritz.box:7920/fx/modlist/pulls/2
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(())