mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 08:53:16 +00:00
local_working_copy: propagate read_dir error from snapshot()
This commit is contained in:
parent
8f55680787
commit
d2c0d92fa2
1 changed files with 6 additions and 4 deletions
|
@ -1043,11 +1043,13 @@ impl TreeState {
|
||||||
|
|
||||||
let git_ignore = git_ignore
|
let git_ignore = git_ignore
|
||||||
.chain_with_file(&dir.to_internal_dir_string(), disk_dir.join(".gitignore"))?;
|
.chain_with_file(&dir.to_internal_dir_string(), disk_dir.join(".gitignore"))?;
|
||||||
let dir_entries = disk_dir
|
let dir_entries: Vec<_> = disk_dir
|
||||||
.read_dir()
|
.read_dir()
|
||||||
.unwrap()
|
.and_then(|entries| entries.try_collect())
|
||||||
.map(|maybe_entry| maybe_entry.unwrap())
|
.map_err(|err| SnapshotError::Other {
|
||||||
.collect_vec();
|
message: format!("Failed to read directory {}", disk_dir.display()),
|
||||||
|
err: err.into(),
|
||||||
|
})?;
|
||||||
dir_entries.into_par_iter().try_for_each_with(
|
dir_entries.into_par_iter().try_for_each_with(
|
||||||
(
|
(
|
||||||
tree_entries_tx.clone(),
|
tree_entries_tx.clone(),
|
||||||
|
|
Loading…
Reference in a new issue