Author: jannis
Date: 2009-03-12 18:15:36 +0000 (Thu, 12 Mar 2009)
New Revision: 29654

Modified:
   thunar/trunk/ChangeLog
   thunar/trunk/thunar-vfs/thunar-vfs-io-jobs.c
Log:
        * thunar-vfs/thunar-vfs-io-jobs.c: Apply umask properly when
          creating files/directories. Patch by Giovanni Bechis (bug
          #3532).

Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog      2009-03-12 14:34:56 UTC (rev 29653)
+++ thunar/trunk/ChangeLog      2009-03-12 18:15:36 UTC (rev 29654)
@@ -1,3 +1,9 @@
+2009-03-12  Jannis Pohlmann <jan...@xfce.org>
+
+       * thunar-vfs/thunar-vfs-io-jobs.c: Apply umask properly when
+         creating files/directories. Patch by Giovanni Bechis (bug 
+         #3532).
+
 2009-02-24  Stephan Arts <step...@xfce.org>
 
        * == Released 1.0.0 ==

Modified: thunar/trunk/thunar-vfs/thunar-vfs-io-jobs.c
===================================================================
--- thunar/trunk/thunar-vfs/thunar-vfs-io-jobs.c        2009-03-12 14:34:56 UTC 
(rev 29653)
+++ thunar/trunk/thunar-vfs/thunar-vfs-io-jobs.c        2009-03-12 18:15:36 UTC 
(rev 29654)
@@ -433,7 +433,7 @@
 
 again:
       /* try to create the file at the given path */
-      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0644);
+      fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE);
       if (G_UNLIKELY (fd < 0))
         {
           /* check if the file already exists */
@@ -708,7 +708,7 @@
       _thunar_vfs_job_process_path (job, lp);
 
       /* try to create the target directory */
-      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0755, THUNAR_VFS_IO_OPS_NONE, 
error))
+      if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777 & ~umask(0), 
THUNAR_VFS_IO_OPS_NONE, error))
         return FALSE;
     }
 

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to