diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-16 14:47:29 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-02-19 18:22:27 +0100 |
commit | cbad767ded9fa50bb3045809e6af3287a59c69b4 (patch) | |
tree | 1f15cd4eae2e87c62ad79b88f0b610e187e74ffd /source3/client/clitar.c | |
parent | e2b0092e1dd7c5a9657960a2d80970dd9d04332e (diff) | |
download | samba-cbad767ded9fa50bb3045809e6af3287a59c69b4.tar.gz samba-cbad767ded9fa50bb3045809e6af3287a59c69b4.tar.xz samba-cbad767ded9fa50bb3045809e6af3287a59c69b4.zip |
clitar.c: implement reset mode
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r-- | source3/client/clitar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index bda416e157e..07edfe281f7 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -471,7 +471,7 @@ int cmd_tarmode(void) * * Update the file attributes with the one provided. */ -static void set_remote_attr(char *filename, uint16 new_attr, int mode) +static void set_remote_attr(const char *filename, uint16 new_attr, int mode) { extern struct cli_state *cli; uint16 old_attr; @@ -717,6 +717,10 @@ static int tar_get_file(struct tar *t, const char *full_dos_path, goto out; } + if (t->mode.reset) { + set_remote_attr(full_dos_path, FILE_ATTRIBUTE_ARCHIVE, ATTR_UNSET); + } + full_unix_path = talloc_asprintf(ctx, ".%s", full_dos_path); string_replace(full_unix_path, '\\', '/'); entry = archive_entry_new(); |