Revision: 1275
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1275&view=rev
Author:   zas_
Date:     2008-11-26 20:38:47 +0000 (Wed, 26 Nov 2008)

Log Message:
-----------
Print a message if chown() or chmod() fail.

Modified Paths:
--------------
    trunk/src/secure_save.c

Modified: trunk/src/secure_save.c
===================================================================
--- trunk/src/secure_save.c     2008-11-26 20:37:14 UTC (rev 1274)
+++ trunk/src/secure_save.c     2008-11-26 20:38:47 UTC (rev 1275)
@@ -275,8 +275,8 @@
                        /* set the dest file attributes to that of source 
(ignoring errors) */
                        if (ssi->preserve_perms)
                                {
-                               chown(ssi->tmp_file_name, st.st_uid, st.st_gid);
-                               chmod(ssi->tmp_file_name, st.st_mode);
+                               if (chown(ssi->tmp_file_name, st.st_uid, 
st.st_gid) != 0) log_printf("chown('%s', %d, %d) failed", ssi->tmp_file_name, 
st.st_uid, st.st_gid);
+                               if (chmod(ssi->tmp_file_name, st.st_mode) != 0) 
log_printf("chmod('%s', %o) failed", ssi->tmp_file_name, st.st_mode);
                                }
 
                        if (ssi->preserve_mtime)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to