Header comments for CreateFile operation

61 views
Skip to first unread message

Tobias Patton

unread,
May 9, 2012, 6:57:36 PM5/9/12
to do...@googlegroups.com
Hello.

The definition of the CreateFile callback has these comments:

// CreateFile
//   If file is a directory, CreateFile (not OpenDirectory) may be called.
//   In this case, CreateFile should return 0 when that directory can be opened.
//   You should set TRUE on DokanFileInfo->IsDirectory when file is a directory.
//   When CreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS and a file already exists,
//   you should return ERROR_ALREADY_EXISTS(183) (not negative value)

But the implementation for for CreateFile in the mirror.c sample application does not:

a) set DokanFileInfo->IsDirectory to true when the file path points to a directory
b) return ERROR_ALREADY_EXISTS when the file exists, and the creationDisposition is CREATE_ALWAYS or OPEN_ALWAYS

Are the comments out of date? Or is mirror.c incorrect/incomplete?

Thanks,
Tobias.  

Smurf IV

unread,
May 10, 2012, 1:37:39 PM5/10/12
to do...@googlegroups.com
Judging by the number of people who expect mirror to be work as expect (And including the issues raised in the googlecode formum) I would say both your questions have the same answer;

your assumption is correct.


--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dokan/-/j3DsVzLfoMsJ.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.

Reply all
Reply to author
Forward
0 new messages