fix extended attribute corruption if new size was smaller (Jean-Pierre Andre)
parent
e4bf04aeea
commit
987e6f7bf9
|
|
@ -1558,6 +1558,11 @@ static int ntfs_fuse_setxattr(const char *path, const char *name,
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (ntfs_attr_truncate(na, (s64)size)) {
|
||||||
|
res = -errno;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
res = ntfs_attr_pwrite(na, 0, size, value);
|
res = ntfs_attr_pwrite(na, 0, size, value);
|
||||||
if (res != (s64) size)
|
if (res != (s64) size)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue