Unverified Commit 43d53700 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

bugfix: handle partial read

It is possible that we read less bytes then requested cause the actual
file doesn't have so much.
parent 56495ac8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -530,7 +530,7 @@ ssize_t read(int fd, void* buf, size_t count) {
            auto ret = adafs_pread_ws(fd, buf, count, pos);
            // Update offset in file descriptor in the file map
            if (ret > 0) {
                adafs_fd->pos(pos + count);
                adafs_fd->pos(pos + ret);
            }
            return ret;
        }