windows: Fix FS-related issues (#23369)
I've noticed an occasional error: `ignoring event C:\some\path\to\file outside of root path \\?\C:\some\path`. This happens because UNC paths always fail to match with non-UNC paths during operations like `strip_prefix` or `starts_with`. To address this, I changed the types of some key parameters to `SanitizedPath`. With this adjustment, FS events are now correctly identified, and under the changes in this PR, the `test_rescan_and_remote_updates` test also passes successfully on Windows. Release Notes: - N/A
This commit is contained in:
parent
8f87b5637a
commit
04c04e8406
4 changed files with 44 additions and 17 deletions
|
@ -24,7 +24,12 @@ use std::{str::FromStr, sync::OnceLock};
|
|||
use std::{mem, num::NonZeroU32, ops::Range, task::Poll};
|
||||
use task::{ResolvedTask, TaskContext};
|
||||
use unindent::Unindent as _;
|
||||
use util::{assert_set_eq, paths::PathMatcher, test::temp_tree, TryFutureExt as _};
|
||||
use util::{
|
||||
assert_set_eq,
|
||||
paths::{replace_path_separator, PathMatcher},
|
||||
test::temp_tree,
|
||||
TryFutureExt as _,
|
||||
};
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_block_via_channel(cx: &mut gpui::TestAppContext) {
|
||||
|
@ -3265,7 +3270,10 @@ async fn test_rescan_and_remote_updates(cx: &mut gpui::TestAppContext) {
|
|||
"d",
|
||||
"d/file3",
|
||||
"d/file4",
|
||||
];
|
||||
]
|
||||
.into_iter()
|
||||
.map(replace_path_separator)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
cx.update(|app| {
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue