mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Improve bad Unicode error handling in txt, CSV, and directory handling
This commit is contained in:
parent
28156bcaf2
commit
9f947ae2c5
3 changed files with 18 additions and 7 deletions
|
|
@ -8,6 +8,7 @@ use crate::{
|
|||
};
|
||||
|
||||
use super::{
|
||||
error::SnapshotError,
|
||||
middleware::{SnapshotFileResult, SnapshotInstanceResult, SnapshotMiddleware},
|
||||
snapshot_from_imfs, snapshot_from_instance,
|
||||
};
|
||||
|
|
@ -38,7 +39,7 @@ impl SnapshotMiddleware for SnapshotDir {
|
|||
.file_name()
|
||||
.expect("Could not extract file name")
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.ok_or_else(|| SnapshotError::file_name_bad_unicode(entry.path()))?
|
||||
.to_string();
|
||||
|
||||
Ok(Some(InstanceSnapshot {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue