if (cur_resume)
flags = O_RDWR;
else
- flags = O_WRONLY | O_EXCL;
+ flags = O_WRONLY;
+
+ if (!cur_resume && !output_file)
+ flags |= O_EXCL;
flags |= O_CREAT;
signal(SIGPIPE, SIG_IGN);
init_ustream_ssl();
- while ((ch = getopt_long(argc, argv, "cO:P:qsU:Y:", longopts, &longopt_idx)) != -1) {
+ while ((ch = getopt_long(argc, argv, "cO:P:qsT:U:Y:", longopts, &longopt_idx)) != -1) {
switch(ch) {
case 0:
switch (longopt_idx) {