You've already forked AstralRinth
forked from didirus/AstralRinth
0.8.0 beta fixes (#2154)
* initial fixes * 0.8.0 beta fixes * run actions * run fmt * Fix windows build * Add purge cache opt * add must revalidate to project req * lint + clippy * fix processes, open folder * Update migrator to use old launcher cache for perf * fix empty dirs not moving * fix lint + create natives dir if not exist * fix large request batches * finish * Fix deep linking on mac * fix comp err * fix comp err (2) --------- Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
@@ -88,7 +88,7 @@ pub(crate) async fn watch_profiles_init(
|
||||
watcher: &FileWatcher,
|
||||
dirs: &DirectoryInfo,
|
||||
) -> crate::Result<()> {
|
||||
if let Ok(profiles_dir) = std::fs::read_dir(&dirs.profiles_dir()) {
|
||||
if let Ok(profiles_dir) = std::fs::read_dir(dirs.profiles_dir()) {
|
||||
for profile_dir in profiles_dir {
|
||||
if let Ok(file_name) = profile_dir.map(|x| x.file_name()) {
|
||||
if let Some(file_name) = file_name.to_str() {
|
||||
@@ -112,18 +112,20 @@ pub(crate) async fn watch_profile(
|
||||
) -> crate::Result<()> {
|
||||
let profile_path = dirs.profiles_dir().join(profile_path);
|
||||
|
||||
for folder in ProjectType::iterator()
|
||||
.map(|x| x.get_folder())
|
||||
.chain(["crash-reports"])
|
||||
{
|
||||
let path = profile_path.join(folder);
|
||||
if profile_path.exists() && profile_path.is_dir() {
|
||||
for folder in ProjectType::iterator()
|
||||
.map(|x| x.get_folder())
|
||||
.chain(["crash-reports"])
|
||||
{
|
||||
let path = profile_path.join(folder);
|
||||
|
||||
if !path.exists() {
|
||||
crate::util::io::create_dir_all(&path).await?;
|
||||
if !path.exists() {
|
||||
crate::util::io::create_dir_all(&path).await?;
|
||||
}
|
||||
|
||||
let mut watcher = watcher.write().await;
|
||||
watcher.watcher().watch(&path, RecursiveMode::Recursive)?;
|
||||
}
|
||||
|
||||
let mut watcher = watcher.write().await;
|
||||
watcher.watcher().watch(&path, RecursiveMode::Recursive)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user