Fixed a bug in set_compression() where the default dont-compress

patterns (e.g. *.gz) would not match a pathname containing a slash.
This commit is contained in:
Wayne Davison committed 2005-12-30 06:03:40 +00:00
1 parent 770de8994e
commit 0fe987e226
1 file changed
+3
+3
View File
@@ -47,6 +47,9 @@ void set_compression(char *fname)
return;
}
if ((tok = strrchr(fname, '/')) != NULL)
fname = tok + 1;
dont = strdup(dont);
fname = strdup(fname);
if (!dont || !fname)