Fix: Fixed issue with stale ADS items after stream delete/move - #18755
Open
yair100 wants to merge 4 commits into
Open
Fix: Fixed issue with stale ADS items after stream delete/move#18755yair100 wants to merge 4 commits into
yair100 wants to merge 4 commits into
Conversation
Member
|
Doing it In Dev, delete and create refresh correctly, rename cause the new and old name to show Doing it out of Dev, delete doesn't refresh , create does refresh correctly, rename cause the new and old name to show |
Contributor
|
I can reproduce that as well (renaming shows both old and new revisions before refreshing) |
Member
Author
|
@Lamparter even after the latest fix? |
Contributor
|
Yes |
Member
|
Renaming doesn't show the old one when doing it the first time but after it show both. Deleting ADS file outside of dev still doesn't refresh |
d2dyno1
reviewed
Jul 24, 2026
| if (renamed.PrimaryItemAttribute == StorageItemTypes.File) | ||
| renamed.FileExtension = Path.GetExtension(newPath); | ||
|
|
||
| foreach (var adsItem in filesAndFolders.ToList().OfType<AlternateStreamItem>().Where(x => x.MainStreamPath.Equals(oldPath, StringComparison.OrdinalIgnoreCase))) |
Member
There was a problem hiding this comment.
Suggested change
| foreach (var adsItem in filesAndFolders.ToList().OfType<AlternateStreamItem>().Where(x => x.MainStreamPath.Equals(oldPath, StringComparison.OrdinalIgnoreCase))) | |
| foreach (var adsItem in filesAndFolders.OfType<AlternateStreamItem>().Where(x => x.MainStreamPath.Equals(oldPath, StringComparison.OrdinalIgnoreCase))) |
| case FILE_ACTION_ADDED_STREAM: | ||
| case FILE_ACTION_REMOVED_STREAM: | ||
| case FILE_ACTION_MODIFIED_STREAM: | ||
| case FILE_ACTION_RECHECK_STREAM: |
Member
There was a problem hiding this comment.
(You can add curly braces {} for cases)
Comment on lines
-2948
to
+2987
| foreach (var adsItem in filesAndFolders.ToList().Where(x => x is AlternateStreamItem ads && ads.MainStreamPath == matchingItem.ItemPath)) | ||
| foreach (var adsItem in filesAndFolders.ToList().Where(x => x is AlternateStreamItem ads && ads.MainStreamPath.Equals(matchingItem.ItemPath, StringComparison.OrdinalIgnoreCase))) |
Member
There was a problem hiding this comment.
Suggested change
| foreach (var adsItem in filesAndFolders.ToList().Where(x => x is AlternateStreamItem ads && ads.MainStreamPath == matchingItem.ItemPath)) | |
| foreach (var adsItem in filesAndFolders.ToList().Where(x => x is AlternateStreamItem ads && ads.MainStreamPath.Equals(matchingItem.ItemPath, StringComparison.OrdinalIgnoreCase))) | |
| foreach (var adsItem in filesAndFolders.ToArray().Where(x => x is AlternateStreamItem ads && ads.MainStreamPath.Equals(matchingItem.ItemPath, StringComparison.OrdinalIgnoreCase))) |
|
|
||
| try | ||
| { | ||
| var items = filesAndFolders.ToList(); |
Member
There was a problem hiding this comment.
Suggested change
| var items = filesAndFolders.ToList(); | |
| var items = filesAndFolders.ToArray(); |
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.
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.