summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-03-17 08:45:36 +0000
committerWayne Davison <wayned@samba.org>2005-03-17 08:45:36 +0000
commit6012eaa1839802515923bcf523d0047a47d207de (patch)
treeac924549a9effd2a5f8299825823d5a515d72158 /util.c
parentda2a6c1f1ca89140622a38d9a8398dd5507883e5 (diff)
downloadrsync-6012eaa1839802515923bcf523d0047a47d207de.tar.gz
rsync-6012eaa1839802515923bcf523d0047a47d207de.tar.bz2
rsync-6012eaa1839802515923bcf523d0047a47d207de.zip
Fixed a problem with the stripping of the .bak/.old/.orig suffixes
in find_filename_suffix().
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 735173d8..ab0e151b 100644
--- a/util.c
+++ b/util.c
@@ -1251,11 +1251,11 @@ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr)
break;
s_len = fn_len - (s - fn);
fn_len = s - fn;
- if (s_len == 3) {
+ if (s_len == 4) {
if (strcmp(s+1, "bak") == 0
|| strcmp(s+1, "old") == 0)
continue;
- } else if (s_len == 4) {
+ } else if (s_len == 5) {
if (strcmp(s+1, "orig") == 0)
continue;
} else if (s_len > 2 && had_tilde