Skip to main content
Topic: sed should create invisible backup files for "-i" option (Read 781 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

sed should create invisible backup files for "-i" option

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:
Code: [Select]
--- sed/execute.c	2020-01-01 20:38:19.000000000 +0100
+++ sed/execute.c 2020-03-26 12:17:30.209662815 +0100
@@ -614,7 +614,7 @@
             }
         }
 
-      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;
This works because ck_mkstemp tests for strlen.

Incidentally, you have to use the command
Code: [Select]
BUILDDIR=/tmp/makepkg makepkg
if the builddir has an ACL on it (one of the tests checks for that), to build sed, or the build will fail.

I already mailed gnu.org about this.