diff --git a/libntfs/attrib.c b/libntfs/attrib.c index bd903b3c..820bc1b0 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -4242,6 +4242,9 @@ int ntfs_attr_truncate(ntfs_attr *na, const s64 newsize) errno = EINVAL; return -1; } + + if (na->data_size == newsize) + return 0; /* * Encrypted attributes are not supported. We return access denied, * which is what Windows NT4 does, too.