win: use file path as ID when the filesystem doesn't support IDs#193
Merged
win: use file path as ID when the filesystem doesn't support IDs#193
Conversation
DHowett
commented
May 21, 2025
DHowett
commented
May 21, 2025
lhecker
reviewed
May 21, 2025
DHowett
commented
May 21, 2025
src/bin/edit/draw_filepicker.rs
Outdated
| && let Some(doc) = state.documents.active() | ||
| && let Some(file_id) = &doc.file_id | ||
| && sys::file_id_at(path).is_ok_and(|id| &id == file_id) | ||
| && sys::file_id(None, doit.as_deref()).is_ok_and(|id| &id == file_id) |
Member
Author
There was a problem hiding this comment.
If doit is None, file_id(None,None) will fail with Err. Technically this means we can remove line R116. WDYT?
lhecker
reviewed
May 21, 2025
lhecker
approved these changes
May 21, 2025
DHowett
added a commit
that referenced
this pull request
May 21, 2025
The fix in #193 required us to create FileIds even for nonexistent files. That broke the creation of nonexistent files.
lhecker
pushed a commit
that referenced
this pull request
May 21, 2025
The fix in #193 required us to create FileIds even for nonexistent files. That broke the creation of nonexistent files.
diabloproject
pushed a commit
to diabloproject/edit
that referenced
this pull request
May 29, 2025
…rosoft#193) Some Windows filesystems do not respond positively to `FILE_ID_INFO` requests. On those filesystems, the best we can do is match on canonical file paths. Closes microsoft#92
diabloproject
pushed a commit
to diabloproject/edit
that referenced
this pull request
May 29, 2025
The fix in microsoft#193 required us to create FileIds even for nonexistent files. That broke the creation of nonexistent files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Windows filesystems do not respond positively to
FILE_ID_INFOrequests.On those filesystems, the best we can do is match on canonical file paths.
Closes #92