microsoft / microsoft/Windows-classic-samples

CloudMirror: multiple files attribute changing not handled correctly

Open
#186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

Right click on a folder / some files inside the sync root directory, chose "Always keep on device" or "Free up space" and the handler inside DirectoryWatcher.cpp will only get called once (for just one file). My fix was to change this line

if (GetOverlappedResultEx(_dir.get(), &_overlapped, &transferred, 1000, FALSE))

to

if (GetOverlappedResult(_dir.get(), &_overlapped, &transferred, TRUE))

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in DirectoryWatcher.cpp at the GetOverlappedResultEx call shown in the issue and trace how directory changes reach the handler. Verify the behavior with a folder or multiple files inside the sync root, using “Always keep on device” or “Free up space”; done means the handler is invoked for every affected file rather than only one.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.