Skip to content

Fix: Fixed issue where some file operations would fail #15139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

hishitetsu
Copy link
Member

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Bug: Permanently delete doesn't work all the time #15133

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?

@gumbarros
Copy link
Contributor

LGTM to me, the changed method is the same from my debug.log from previous issues:

2024-04-05 19:35:03.0538|Error|System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ()
 ---> System.Runtime.InteropServices.COMException (0x800706F4)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at ABI.Files.App.Server.Database.IFileTagsDatabaseClassMethods.SetTags(IObjectReference _obj, String filePath, Nullable`1 frn, String[] tags)
   at Files.App.Utils.FileTags.FileTagsHelper.UpdateTagsDb()

Copy link
Member

@hez2010 hez2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM!

@@ -102,7 +102,7 @@ public string[] FileTags
{
Debug.Assert(value != null);
var dbInstance = FileTagsHelper.GetDbInstance();
dbInstance.SetTags(ItemPath, FileFRN, value);
dbInstance.SetTags(ItemPath, FileFRN, value ?? []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already asserted value is not null. I think we can keep here as it was.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that for Debug condition?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug.Assert is ignored in the release build, so I'm not sure if value is not null here.

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Apr 8, 2024
@yaira2 yaira2 merged commit afcd8b4 into files-community:main Apr 8, 2024
@hishitetsu hishitetsu deleted the FixSetTags branch April 9, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Permanently delete doesn't work all the time
5 participants