Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > d446d566d04bb2588597c191f49a6aa5 > files > 6

gettext-0.17-3mdv2009.0.src.rpm

--- gettext-tools/src/write-catalog.c	2007-10-07 21:37:39.000000000 +0200
+++ gettext-tools/src/write-catalog.c.oden	2008-06-29 01:19:44.000000000 +0200
@@ -220,7 +220,9 @@ message catalog has plural form translat
       /* Open the output file.  */
       if (!to_stdout)
 	{
-	  fd = open (filename, O_WRONLY | O_CREAT);
+	  fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
+	    /* 0666 in portable POSIX notation: */
+	    S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
 	  if (fd < 0)
 	    {
 	      const char *errno_description = strerror (errno);