>From 281b457e05a9fdb7b13dd3eb038455121b8747f7 Mon Sep 17 00:00:00 2001 From: nokangaroo Date: Mon, 30 Mar 2020 23:07:53 -0600 Subject: [PATCH] sed: make backup files for "-i" option invisible The visible backup files create problems with file managers, e. g. they show up in MATE, and I have to reload the folder to make them disappear. The following patch creates invisible files. * sed/execute.c (open_next_file): Use ".sed" as basename for ck_mkstemp to create a hidden file (on unix systems). --- sed/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sed/execute.c b/sed/execute.c index f94b125..28573fc 100644 --- a/sed/execute.c +++ b/sed/execute.c @@ -614,7 +614,7 @@ open_next_file (const char *name, struct input *input) } } - output_file.fp = ck_mkstemp (&input->out_file_name, tmpdir, "sed", + output_file.fp = ck_mkstemp (&input->out_file_name, tmpdir, ".sed", write_mode); register_cleanup_file (input->out_file_name); output_file.missing_newline = false; -- 2.20.1