diff options
author | David Dykstra <dwd@samba.org> | 1998-11-25 15:37:50 +0000 |
---|---|---|
committer | David Dykstra <dwd@samba.org> | 1998-11-25 15:37:50 +0000 |
commit | 63f0774f7562c3b51d14dcca78ea0dc0fa354c46 (patch) | |
tree | 68c3f17183cea3eb5b26073937b13eccdfb0b71c /token.c | |
parent | d47741cac62e80d5ffd6f01274e3b7b48b2849e1 (diff) | |
download | android_external_rsync-63f0774f7562c3b51d14dcca78ea0dc0fa354c46.tar.gz android_external_rsync-63f0774f7562c3b51d14dcca78ea0dc0fa354c46.tar.bz2 android_external_rsync-63f0774f7562c3b51d14dcca78ea0dc0fa354c46.zip |
Back out change that treated "refuse options = compress" the same as
"dont compress = *", by request of Tridge. Instead, mention the difference
in the man page. Also, put in a shortcut in set_compression() to recognize
"*" earlier instead of going through malloc/strtok/fnmatch/free cycle.
Diffstat (limited to 'token.c')
-rw-r--r-- | token.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -21,7 +21,6 @@ #include "zlib/zlib.h" extern int do_compression; -int default_compression_level = Z_DEFAULT_COMPRESSION; static int compression_level = Z_DEFAULT_COMPRESSION; /* determine the compression level based on a wildcard filename list */ @@ -33,11 +32,17 @@ void set_compression(char *fname) if (!do_compression) return; - compression_level = default_compression_level; + compression_level = Z_DEFAULT_COMPRESSION; dont = lp_dont_compress(module_id); if (!dont || !*dont) return; + if ((dont[0] == '*') && (!dont[1])) { + /* an optimization to skip the rest of this routine */ + compression_level = 0; + return; + } + dont = strdup(dont); fname = strdup(fname); if (!dont || !fname) return; |