Add encrypt support to lrzip.conf

This commit is contained in:
Con Kolivas 2011-04-22 18:49:24 +10:00
parent 7a74991f3f
commit 30e990fbcf
2 changed files with 7 additions and 0 deletions

View file

@ -57,3 +57,7 @@
# Override for Temporary Directory. Only valid when stdin/out or Test is used # Override for Temporary Directory. Only valid when stdin/out or Test is used
# TMPDIR = /tmp # TMPDIR = /tmp
# ENCRYPT = NO
# Whether to use encryption on compression

3
main.c
View file

@ -427,6 +427,9 @@ static void read_config(rzip_control *control)
strcpy(control->tmpdir, parametervalue); strcpy(control->tmpdir, parametervalue);
if (strcmp(parametervalue + strlen(parametervalue) - 1, "/")) if (strcmp(parametervalue + strlen(parametervalue) - 1, "/"))
strcat(control->tmpdir, "/"); strcat(control->tmpdir, "/");
} else if (isparameter(parameter, "encrypt")) {
if (isparameter(parameter, "YES"))
control->flags |= FLAG_ENCRYPT;
} else } else
/* oops, we have an invalid parameter, display */ /* oops, we have an invalid parameter, display */
print_err("lrzip.conf: Unrecognized parameter value, %s = %s. Continuing.\n",\ print_err("lrzip.conf: Unrecognized parameter value, %s = %s. Continuing.\n",\