Skip to content

Commit 7965bc0

Browse files
committed
Fix windows test
1 parent 215bcdc commit 7965bc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/tmc-langs-framework/src/plugin.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,11 @@ pub trait LanguagePlugin {
330330
loop {
331331
let next = iter.with_next::<(), _>(|file| {
332332
let file_path = file.path()?;
333+
// Normalize the path to handle Windows backslashes correctly
334+
let normalized_path = file_path.to_string_lossy().replace('\\', "/");
335+
let normalized_path = Path::new(&normalized_path);
333336
// Only consider entries at the archive root
334-
if file_path.components().count() == 1 {
337+
if normalized_path.components().count() == 1 {
335338
if file.is_dir() {
336339
folders.push(file_path.to_path_buf());
337340
} else if file.is_file() {

0 commit comments

Comments
 (0)