microsoft / microsoft/VFSForGit
Mac: Detect new folders sooner in the vnode op event handler, remove NeedsNewFolderCreateNotification, and try enabling NeedsNewFolderCreateNotification functional tests
@wilbaker is already working on this.
Since Jul 19, 2019.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
Possibly fixes #360 and possibly allows NeedsNewFolderCreateNotification tests to be enabled on Mac.
A few changes are needed:
-
Update ShouldHandleVnodeOpEvent to check the vnode cache rather than the
FileFlags_IsInVirtualizationRootflag when deciding if an event should be handled. -
In the directory handling if/else code blocks here:
if (isDirectory)
{
if (isRename ||
ActionBitIsSet(
action,
KAUTH_VNODE_LIST_DIRECTORY |
KAUTH_VNODE_SEARCH |
KAUTH_VNODE_READ_SECURITY |
KAUTH_VNODE_READ_ATTRIBUTES |
KAUTH_VNODE_READ_EXTATTRIBUTES))
{
Use if (!FileFlagsBitIsSet(currentVnodeFileFlags, FileFlags_IsInVirtualizationRoot)) to detect new folders and notify VFS4G.
-
With the above changes we should be able to remove
FindNewFoldersInRootAndNotifyProviderand its associated code. -
See if
NeedsNewFolderCreateNotificationcan be enabled (still TBD if we're guaranteed to get a vnode op callback from simply creating a directory). -
If with this change
FileFlags_IsInVirtualizationRootis only used to track if the provider knows about the file, rename the flag to something likeFileFlags_IsTrackedByProvider
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.