From 650eaddb89db3e2511e37b49e7d694502354e260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 20 Oct 2011 18:49:58 +0200 Subject: [PATCH] new : allowed compression in ntfscp --- ntfsprogs/ntfscp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ntfsprogs/ntfscp.c b/ntfsprogs/ntfscp.c index 8f4b3064..2f99b075 100644 --- a/ntfsprogs/ntfscp.c +++ b/ntfsprogs/ntfscp.c @@ -359,6 +359,8 @@ int main(int argc, char *argv[]) if ((vol->flags & VOLUME_IS_DIRTY) && !opts.force) goto umount; + NVolSetCompression(vol); /* allow compression */ + { struct stat fst; if (stat(opts.src_file, &fst) == -1) { @@ -558,6 +560,9 @@ int main(int argc, char *argv[]) } offset += bw; } + if ((na->data_flags & ATTR_COMPRESSION_MASK) + && ntfs_attr_pclose(na)) + ntfs_log_perror("ERROR: ntfs_attr_pclose failed"); ntfs_log_verbose("Syncing.\n"); result = 0; free(buf);