Update of /cvsroot/faubackup/faubackup
In directory sc8-pr-cvs1:/tmp/cvs-serv11067
Modified Files:
faubackup-scatter.c
Log Message:
set mode after owner
this way backup as non-root doesn't complain about non-writeable files
Index: faubackup-scatter.c
===================================================================
RCS file: /cvsroot/faubackup/faubackup/faubackup-scatter.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** faubackup-scatter.c 20 Aug 2003 18:05:56 -0000 1.9
--- faubackup-scatter.c 15 Oct 2003 12:10:12 -0000 1.10
***************
*** 381,384 ****
--- 381,395 ----
mode = st->st_mode & 07777;
+ if( flags & SET_TIME ) {
+ u.actime = st->st_atime;
+ u.modtime = st->st_mtime;
+ ret = utime( path, &u );
+ if( ret < 0 ) {
+ fprintf( stderr, "%s: utime(%s, [...]): %s\n",
+ progname, path, strerror(errno) );
+ error++;
+ }
+ }
+
/* set owner, unset suid/sgid bits if chown fails */
if( flags & SET_OWNER ) {
***************
*** 402,416 ****
progname, path, (int) mode,
strerror(errno) );
- error++;
- }
- }
-
- if( flags & SET_TIME ) {
- u.actime = st->st_atime;
- u.modtime = st->st_mtime;
- ret = utime( path, &u );
- if( ret < 0 ) {
- fprintf( stderr, "%s: utime(%s, [...]): %s\n",
- progname, path, strerror(errno) );
error++;
}
--- 413,416 ----
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.