FileNode::truncate can return positive error codes

Issue #70 new
Former user created an issue

FileNode::truncate says "return EIO" or "return EBADF".

Inserting a unary minus ("return -EIO" or "return -EBADF"), so that it returns a negative error code, would be more consistent with the rest of the program.

Comments (1)

  1. Alexander Galanin repo owner

    It is not a bug: as you can see in lib/fuse-zip.cpp in functions fusezip_ftruncate and fusezip_truncate, result of FileNode::truncate is negated.

    I agree with you that returning positive error code from FileNode::truncate is a bit surprising. So I will now convert this issue to a ‘proposal’ to fix it later.

  2. Log in to comment