Skip to content

Commit

Permalink
Merge branch 'hotfix/tmp-storage-steamdeck' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ktwrd committed Jul 10, 2024
2 parents bf15a4b + ae3e07f commit 9aaa4df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/helper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,7 @@ pub fn file_exists(location: String) -> bool
/// Check if the location provided exists and it's a directory.
pub fn dir_exists(location: String) -> bool
{
if file_exists(location.clone()) {
return is_directory(location.clone());
}
return false;
file_exists(location.clone()) && is_directory(location.clone())
}
pub fn is_directory(location: String) -> bool
{
Expand Down Expand Up @@ -407,6 +404,13 @@ pub fn get_tmp_dir() -> String
dir = String::from("/var/tmp");
}
dir = format_directory_path(dir);
if !dir_exists(dir.clone()) {
if let Err(e) = std::fs::create_dir(&dir) {
trace!("[helper::get_tmp_dir] {:#?}", e);
warn!("[helper::get_tmp_dir] failed to make tmp directory at {} ({:})", dir, e);
return;

Check failure on line 411 in src/helper/mod.rs

View workflow job for this annotation

GitHub Actions / release ubuntu-20.04

`return;` in a function whose return type is not `()`
}
}
dir = join_path(dir, String::from("beans-rs"));
dir = format_directory_path(dir);

Expand Down

0 comments on commit 9aaa4df

Please sign in to comment.