diff options
author | fx <[email protected]> | 2023-04-27 10:10:03 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-04-27 10:10:03 +0200 |
commit | 43ca5fec20933fc31dfe7d7dbd1f1b9258612219 (patch) | |
tree | eef58fecfadad90386b38af581abab8cc3d3cfc0 /src/commands/io.rs | |
parent | 4300ad2eb05dddfa4274e04b204f2ad28c87da05 (diff) | |
parent | 4e6466af1329f7b9e341df2e76ab696d11f80c93 (diff) | |
download | modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.tar modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.tar.gz modlist-43ca5fec20933fc31dfe7d7dbd1f1b9258612219.zip |
Merge pull request 'cache' (#3) from cache into master
Reviewed-on: http://raspberrypi.fritz.box:7920/fx/modlist/pulls/3
Diffstat (limited to 'src/commands/io.rs')
-rw-r--r-- | src/commands/io.rs | 5 |
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::*; | |||
5 | use crate::{ | 5 | use 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(()) |