diff options
author | Werner Koch <[email protected]> | 2023-06-13 08:07:07 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-06-13 08:07:07 +0000 |
commit | 808494b48577c2efb894a0877f59d9c4ed664f56 (patch) | |
tree | 2cbec3605802ff7e2c5d205d55b5322c91b44d12 /g10/gpg.c | |
parent | gpg: Print status line and proper diagnostics for write errors. (diff) | |
download | gnupg-808494b48577c2efb894a0877f59d9c4ed664f56.tar.gz gnupg-808494b48577c2efb894a0877f59d9c4ed664f56.zip |
gpg: Make progress work for large files on Windows.
* common/iobuf.c (iobuf_get_filelength): Change return type to
uint64_t and remove the overflow args. For Windows always use
GetFileSizeEx which is available since the long EOL-ed Windows XP.
* g10/sign.c (write_plaintext_packet): Adjust for changed
iobuf_get_filelength.
* g10/encrypt.c (encrypt_simple, encrypt_crypt): Ditto.
* g10/photoid.c (generate_photo_id): Ditto. Also add an upper limit.
* g10/filter.h (progress_filter_context_t): Change amount values to
use uint64_t.
* g10/progress.c (write_status_progress): Change accordingly.
--
GnuPG-bug-id: 6534
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3499,7 +3499,13 @@ main (int argc, char **argv) case oAllowFreeformUID: opt.allow_freeform_uid = 1; break; case oNoAllowFreeformUID: opt.allow_freeform_uid = 0; break; case oNoLiteral: opt.no_literal = 1; break; - case oSetFilesize: opt.set_filesize = pargs.r.ret_ulong; break; + + case oSetFilesize: + /* There are restricts on the value (e.g. < 2^32); you + * need to check the entire code to understand this. */ + opt.set_filesize = pargs.r.ret_ulong; + break; + case oFastListMode: opt.fast_list_mode = 1; break; case oFixedListMode: /* Dummy */ break; case oLegacyListMode: opt.legacy_list_mode = 1; break; |