winfsp / cgofuse

Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
https://winfsp.dev
MIT License
514 stars 82 forks source link

Delete Folder with Files is not calling Rmdir #32

Closed mohankumarv2005 closed 5 years ago

mohankumarv2005 commented 5 years ago

When I delete a Folder which contains one or more Files, the callback Rmdir is not called on Folder. Only the Unlink is called for all the files in that Folder.

Any idea or workaround for this issue?

billziss-gh commented 5 years ago

I am suspecting a problem with either how you set user permissions on your files (e.g. are you using the -o uid=UID,gid=GID options?) or perhaps a problem with the file system itself.

Are you running the file system with the -d option to get debug output and see what file system requests you receive from the operating system?

mohankumarv2005 commented 5 years ago

Thank you for your response. Yes, we are using following options to Mount.

options := []string{"-o", "volname=Altair", "-o", "uid=-1", "-o", "gid=-1"} host.Mount(mountDrive, options)

Also, surprisingly when I started the file system with “-d” option, I see Rmdir() being called correctly on the selected folder and therefore no issues with Delete.

Any thoughts on how starting in debug mode having an effect on invoking Rmdir() Callback?

billziss-gh commented 5 years ago

In my opinion this strongly suggests that there is a problem with your file system.

There is no functional difference when running with the -d option. The WinFsp DLL simply logs all requests/responses from/to the kernel to stderr.