mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Relax debug assert in IMFS, since paths can alias now
This commit is contained in:
parent
fb5245e2af
commit
34b99a51c3
1 changed files with 5 additions and 3 deletions
|
|
@ -89,11 +89,13 @@ impl Imfs {
|
||||||
|
|
||||||
pub fn add_root(&mut self, path: &Path) -> Result<(), FsError> {
|
pub fn add_root(&mut self, path: &Path) -> Result<(), FsError> {
|
||||||
debug_assert!(path.is_absolute());
|
debug_assert!(path.is_absolute());
|
||||||
debug_assert!(!self.is_within_roots(path));
|
|
||||||
|
|
||||||
|
if !self.is_within_roots(path) {
|
||||||
self.roots.insert(path.to_path_buf());
|
self.roots.insert(path.to_path_buf());
|
||||||
|
self.descend_and_read_from_disk(path)?;
|
||||||
|
}
|
||||||
|
|
||||||
self.descend_and_read_from_disk(path)
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn remove_root(&mut self, path: &Path) {
|
pub fn remove_root(&mut self, path: &Path) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue