Skip to content

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Jul 16, 2024

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.

  1. Opened Files ...
  2. ...

@yaira2 yaira2 added the ready for review Pull requests that are ready for review label Jul 16, 2024
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2
Copy link
Member Author

yaira2 commented Jul 17, 2024

@0x5bfa I don't think wrapping EnableRaisingEvents will help if the error doesn't occur until the watcher is already started.

@yaira2 yaira2 merged commit 8260de7 into main Jul 17, 2024
@yaira2 yaira2 deleted the ya/RecycleBinWatcher branch July 17, 2024 01:26
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Jul 17, 2024
@0x5bfa
Copy link
Member

0x5bfa commented Jul 17, 2024

Why not check if exists before instancing it.

@yaira2
Copy link
Member Author

yaira2 commented Jul 17, 2024

We check on line 51 but that doesn't seem to help.

@0x5bfa
Copy link
Member

0x5bfa commented Jul 17, 2024

This method doesn't work sometimes lol I'm wondering why.
It produces not found exception when CreateFile fails. Do you think we should have our own checker using that function?

// bool StorageHelper.IfExists(string path);
HANDLE hFile = CreateFileW(path, ...);
if (hFile == -1) return false;

@yaira2
Copy link
Member Author

yaira2 commented Jul 17, 2024

It's something to look into

yaira2 added a commit that referenced this pull request Jul 24, 2024
yaira2 added a commit that referenced this pull request Jul 24, 2024
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.

3 participants