File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,11 @@ fn canonicalize_if_on_windows(path: &Path) -> Option<PathBuf> {
198
198
}
199
199
200
200
pub ( crate ) fn path_to_file_id ( path : & Path , vfs : & Vfs ) -> Option < FileId > {
201
- // There seems to be some flaky inconsistencies around UNC paths on Windows, so if we fail to
202
- // find the file id for a UNC path like that, we try to canonicalize it using dunce then.
201
+ // There seems to be some flaky inconsistencies around paths on Windows, where sometimes paths
202
+ // are registered in `vfs` without the `//?/` long path prefix. Then it happens that paths with
203
+ // that prefix are not found. To work around that, on Windows after failing to find `path` as
204
+ // is, we then try to canonicalize it using dunce. Dunce will be able to losslessly convert a
205
+ // `//?/` path into its equivalent one in `vfs` without the prefix, if there is one.
203
206
iter:: once ( path. to_path_buf ( ) )
204
207
. chain ( canonicalize_if_on_windows ( path) )
205
208
. filter_map ( |p| {
You can’t perform that action at this time.
0 commit comments