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>
This commit is contained in:
parent
5eb292dc10
commit
c8f61c3963
@ -89,6 +89,10 @@ impl ProcessorTransactionLog {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(parent_folder) = path.parent() {
|
||||
async_fs::create_dir_all(parent_folder).await?;
|
||||
}
|
||||
|
||||
Ok(Self {
|
||||
log_file: File::create(path).await?,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user