Skip to content

replace a read-only file cause the parent folder keep being occupied #1298

Description

@NatsuKageX

the reproduce methods:
1.run mirror sample.
2.create a new txt file in dokan disk.
3.set the txt file read-only attribute.
4.copy a new txt file with same filename to dokan disk and try overwrite the old one.
5.rename the other files below the same dokan parent folder of the txt file, it will always return status_sharing_violation

from the debug mode, I saw the parent folder was opened by dokan.dll and does not close it no more. I can fix it by return ACCESS_DENIED on function MirrorCreateFile when try to overwrite a read-only file or close the opened handle in function DispatchCreate, but I'm not sure which way is better.

Image

Image

Image

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions