Change pattern of tmpfiles from <name>.tmpXXXXXX to <name>tmpXXXXXX
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 20 Oct 2015 09:19:23 +0000 (11:19 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 20 Oct 2015 09:19:23 +0000 (11:19 +0200)
Under wine, and presumably certain windows systems, filenames with more than one dot are not allowed.

src/data/make-file.c
tests/data/file.at

index b5d6d5845b964a901111072051a7b987a4fa3e63..c8f3238a80cdc2f7a7c5d9479cc72c2bbf191df5 100644 (file)
@@ -108,7 +108,7 @@ replace_file_start (const struct file_handle *fh, const char *mode,
   for (;;)
     {
       /* Generate unique temporary file name. */
-      rf->tmp_name = xasprintf ("%s.tmpXXXXXX", file_name);
+      rf->tmp_name = xasprintf ("%stmpXXXXXX", file_name);
       if (gen_tempname (rf->tmp_name, 0, 0600, GT_NOCREATE) < 0)
         {
          saved_errno = errno;
index b9b81deb97a69c92726872d34ab6705a7a3c0f5c..50a0da9bd14454b5f6569d24513114c8cac5f302 100644 (file)
@@ -53,7 +53,7 @@ BEGIN DATA.
 5
 END DATA.
 XSAVE OUTFILE='foobar.sav'.
-HOST COMMAND=[['rm foobar.sav.tmp*']].
+HOST COMMAND=[['rm foobar.savtmp*']].
 EXECUTE.
 ])