Update FuseFileSystemProvider.java - return the correct value from read method#14
Update FuseFileSystemProvider.java - return the correct value from read method#14NaamaGertel wants to merge 1 commit into
Conversation
when reading from the buffer in line 296, if we got -1 it means 0 bytes were read, so we need to return 0, this is the right value for n
|
I think the problem here is conflicting Both POSIX and Java methods return values are the number of bytes read - if any bytes were read. The difference lies in error detection and the handling of end-of-file scenario, which the original code (before this patch) completely ignored: if the Java's Because POSIX This patch appears to fix the problem - if no exception occured, |
when reading from the buffer in line 296, if we got -1 it means 0 bytes were read, so we need to return 0, because this is the right value for n