File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,18 @@ pub static CACHE_DIR: LazyLock<String> = LazyLock::new(|| {
1717 let cache_dir = HOME_DIR . clone ( ) + "/.cache/lumin/" ;
1818
1919 if !std:: fs:: exists ( & cache_dir) . expect ( "Can check if cache_dir exists" ) {
20- log:: info!( "Data dir not found. Creating at path {cache_dir:?}" ) ;
20+ log:: info!( "cache_dir not found. Creating at path {cache_dir:?}" ) ;
2121 std:: fs:: create_dir_all ( & cache_dir) . expect ( "Could create cache_dir" ) ;
2222 }
2323 cache_dir
2424} ) ;
25+
26+ pub static CONFIG_DIR : LazyLock < String > = LazyLock :: new ( || {
27+ let config_dir = HOME_DIR . clone ( ) + "/.config/lumin/" ;
28+
29+ if !std:: fs:: exists ( & config_dir) . expect ( "Can check if config_dir exists" ) {
30+ log:: info!( "Config dir not found. Creating at path {config_dir:?}" ) ;
31+ std:: fs:: create_dir_all ( & config_dir) . expect ( "Could create config_dir" ) ;
32+ }
33+ config_dir
34+ } ) ;
You can’t perform that action at this time.
0 commit comments