Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 853574dd authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix sdcard truncates.

Use truncate64 instead of truncate so we don't truncate (ho ho) the offset.

(cherrypick of 4568565e.)

Bug: https://code.google.com/p/android/issues/detail?id=74039
Change-Id: I63711ccd299e3ebc475563b1999817d1919571ab
parent e7ec28bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -903,7 +903,7 @@ static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
    /* XXX: incomplete implementation on purpose.
     * chmod/chown should NEVER be implemented.*/

    if ((req->valid & FATTR_SIZE) && truncate(path, req->size) < 0) {
    if ((req->valid & FATTR_SIZE) && truncate64(path, req->size) < 0) {
        return -errno;
    }