X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fincremen.c;h=50be0101e716e632fa5e262df76c6986335d8643;hb=1ef212d0fbf8eec055b6146bbe9a725f6ca190b3;hp=acccb8f605753ff9170a9b94479540521bd3d845;hpb=efe6609cd997116b4f29181b57117ff6d91c7d98;p=chaz%2Ftar diff --git a/src/incremen.c b/src/incremen.c index acccb8f..50be010 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -609,10 +609,17 @@ get_directory_contents (char *dir, dev_t device) static void obstack_code_rename (struct obstack *stk, char *from, char *to) { + char *s; + + s = from[0] == 0 ? from : + safer_name_suffix (from, false, absolute_names_option); obstack_1grow (stk, 'R'); - obstack_grow (stk, from, strlen (from) + 1); + obstack_grow (stk, s, strlen (s) + 1); + + s = to[0] == 0 ? to: + safer_name_suffix (to, false, absolute_names_option); obstack_1grow (stk, 'T'); - obstack_grow (stk, to, strlen (to) + 1); + obstack_grow (stk, s, strlen (s) + 1); } static bool