Skip to content

Commit c8f61c3

Browse files
mockersfcart
andauthored
create imported asset directory if needed (#9716)
# Objective - Related to #9715 - Example `asset_processing` logs the following error: ``` thread 'IO Task Pool (1)' panicked at 'Failed to initialize asset processor log. This cannot be recovered. Try restarting. If that doesn't work, try deleting processed asset folder. No such file or directory (os error 2)', crates/bevy_asset/src/processor/mod.rs:867:25 ``` ## Solution - Create the log directory if needed --------- Co-authored-by: Carter Anderson <mcanders1@gmail.com>
1 parent 5eb292d commit c8f61c3

File tree

1 file changed

+4
-0
lines changed
  • crates/bevy_asset/src/processor

1 file changed

+4
-0
lines changed

crates/bevy_asset/src/processor/log.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ impl ProcessorTransactionLog {
8989
}
9090
}
9191

92+
if let Some(parent_folder) = path.parent() {
93+
async_fs::create_dir_all(parent_folder).await?;
94+
}
95+
9296
Ok(Self {
9397
log_file: File::create(path).await?,
9498
})

0 commit comments

Comments
 (0)