Skip to content

Commit 98caacd

Browse files
committed
fix: directory creation in data
1 parent aa7e2b7 commit 98caacd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/data.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ impl Default for FileInfo {
4141

4242
/// Reads the YAML file and returns a `FileInfo` struct
4343
fn read_config() -> Result<FileInfo> {
44-
std::fs::create_dir_all(format!(
45-
"{}/
46-
WALLSHIFT_DIR",
47-
get_home_dir()?
48-
))?;
44+
std::fs::create_dir_all(format!("{}/WALLSHIFT_DIR", get_home_dir()?))?;
4945

5046
let path_str = get_wallpaper_info_path()?;
5147

@@ -79,11 +75,7 @@ where
7975
}
8076
/// Saves the path to the current wallpaper on the right file
8177
pub fn save_wallpaper(wallpaper: &str) -> Result<()> {
82-
std::fs::create_dir_all(format!(
83-
"{}/
84-
WALLSHIFT_DIR",
85-
get_home_dir()?
86-
))?;
78+
std::fs::create_dir_all(format!("{}/WALLSHIFT_DIR", get_home_dir()?))?;
8779

8880
modify_config(|info| FileInfo {
8981
wallpaper: wallpaper.to_string(),

0 commit comments

Comments
 (0)