Discussion:
bug#23153: [PATCH]: For FIXME in cp.c
(too old to reply)
Pádraig Brady
2016-11-02 17:59:34 UTC
Permalink
Raw Message
unarchive 23153
stop
Did fix that - changing function call to GNU style and "suffix_from_env" to
local variable. The corresponding patch is attached.
+ char *suffix_from_env;
size_t ssize;
bool simple = true;
+
+ /* If simple_backup_suffix is '~', check environment if we have any
there. */
+ if (strcmp(simple_backup_suffix, "~") == 0)
+ if ((suffix_from_env = getenv("SIMPLE_BACKUP_SUFFIX")) != NULL)
+ simple_backup_suffix = xstrdup (suffix_from_env);
+
Sorry for the delay.

I'll apply the attached variant to gnulib instead.
That has the property that --suffix=~ will still override
an env variable of SIMPLE_BACKUP_SUFFIX.
It also avoids a redundant malloc, and handles empty env variables.

I'll then apply the coreutils patches in your name.

thanks,
Pádraig

Loading...