ext/gnomevfs/gstgnomevfssink.c: use 0666 mask when creating files so umask gets appli...
authorWim Taymans <wim.taymans@gmail.com>
Sun, 19 Feb 2006 14:32:35 +0000 (14:32 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sun, 19 Feb 2006 14:32:35 +0000 (14:32 +0000)
Original commit message from CVS:
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_open_file):
use 0666 mask when creating files so umask gets applied
correctly. Fixes #331295.

ChangeLog
ext/gnomevfs/gstgnomevfssink.c

index e80c1b963bd709f61479ea31a5ac442dd7fc6c01..5886238f9233bb927488d971e05406ed4328d729 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-19  Wim Taymans  <wim@fluendo.com>
+
+       * ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_open_file):
+       use 0666 mask when creating files so umask gets applied
+       correctly. Fixes #331295.
+
 2006-02-19  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/subparse/Makefile.am:
index 9114d65062911de824c98f9211a3192bd1757f75..f838aacf87d3a01615423e9ce329652caf8df8f5 100644 (file)
@@ -331,11 +331,13 @@ gst_gnome_vfs_sink_open_file (GstGnomeVFSSink * sink)
   GnomeVFSResult result;
 
   if (sink->uri) {
-    /* open the file */
+    /* open the file, all permissions, umask will apply */
     result = gnome_vfs_create_uri (&(sink->handle), sink->uri,
         GNOME_VFS_OPEN_WRITE, TRUE,
-        GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
-        | GNOME_VFS_PERM_GROUP_READ);
+        GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE |
+        GNOME_VFS_PERM_GROUP_READ | GNOME_VFS_PERM_GROUP_WRITE |
+        GNOME_VFS_PERM_OTHER_READ | GNOME_VFS_PERM_OTHER_WRITE);
+
     /* if the file existed and the property says to ask, then ask! */
     if (result == GNOME_VFS_ERROR_FILE_EXISTS) {
       gboolean erase_anyway = FALSE;
@@ -346,8 +348,9 @@ gst_gnome_vfs_sink_open_file (GstGnomeVFSSink * sink)
       if (erase_anyway) {
         result = gnome_vfs_create_uri (&(sink->handle), sink->uri,
             GNOME_VFS_OPEN_WRITE, FALSE,
-            GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
-            | GNOME_VFS_PERM_GROUP_READ);
+            GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE |
+            GNOME_VFS_PERM_GROUP_READ | GNOME_VFS_PERM_GROUP_WRITE |
+            GNOME_VFS_PERM_OTHER_READ | GNOME_VFS_PERM_OTHER_WRITE);
       }
     }