mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
Fix missing directory error
This commit is contained in:
parent
ba9ebb2a53
commit
0a2504dbda
1 changed files with 4 additions and 1 deletions
|
@ -124,7 +124,10 @@ fn append_extension(path: impl Into<PathBuf>, ext: &'static str) -> PathBuf {
|
||||||
fn is_file_not_found_error(err: &LuaError) -> bool {
|
fn is_file_not_found_error(err: &LuaError) -> bool {
|
||||||
if let ExternalError(err) = err {
|
if let ExternalError(err) = err {
|
||||||
if let Some(err) = err.as_ref().downcast_ref::<std::io::Error>() {
|
if let Some(err) = err.as_ref().downcast_ref::<std::io::Error>() {
|
||||||
err.kind() == ErrorKind::NotFound
|
matches!(
|
||||||
|
err.kind(),
|
||||||
|
ErrorKind::NotFound | ErrorKind::PermissionDenied
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue