Store files in shared directory
This commit is contained in:
parent
a0b89d5acf
commit
ee4a7f8f15
4 changed files with 11 additions and 10 deletions
|
@ -5,7 +5,7 @@ use std::fs;
|
|||
use error::PError;
|
||||
|
||||
pub fn get_config_root() -> Result<PathBuf, PError> {
|
||||
if let Ok(mut root) = data_root(AppDataType::UserConfig){
|
||||
if let Ok(mut root) = data_root(AppDataType::SharedConfig){
|
||||
root.push("Polaris");
|
||||
return match fs::create_dir_all(&root) {
|
||||
Ok(()) => Ok(root),
|
||||
|
@ -16,7 +16,7 @@ pub fn get_config_root() -> Result<PathBuf, PError> {
|
|||
}
|
||||
|
||||
pub fn get_cache_root() -> Result<PathBuf, PError> {
|
||||
if let Ok(mut root) = data_root(AppDataType::UserCache){
|
||||
if let Ok(mut root) = data_root(AppDataType::SharedData){
|
||||
root.push("Polaris");
|
||||
return match fs::create_dir_all(&root) {
|
||||
Ok(()) => Ok(root),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue