What steps will reproduce the problem?
1. Open small file on dokan mounted volume using CreateFile(...)
2. Call ReadFile with buffer big enough to read entire file at once
3. Call ReadFile again, it returns 0 in lpNumberOfBytesRead
4. Now call SetFilePointer(handle, -2, FILE_CURRENT)
That will fail with error saying that file pointer cannot be moved before
beginning of file
What is the expected output? What do you see instead?
SetFilePointer should return fileSize - 2
What version of the product are you using? On what operating system?
Any OS
Please provide any additional information below.
Problem is in read.c file in dokan folder, line 70. If readLength == 0,
eventInfo->Read.CurrentByteOffset.QuadPart is not set so it will be 0 which
means that file pointer is moved to the beginning of the file which is not
correct. It should stay at the end of the file. Problem can be easily fixed by
moving that line outside of the "else" block so it's always executed.
Original issue reported on code.google.com by sslav...@gmail.com on 24 Aug 2010 at 6:30
Original issue reported on code.google.com by
sslav...@gmail.com
on 24 Aug 2010 at 6:30