faubackup2/src/common system_calls.cpp,1.8,1.9
Erik Merkel <[email protected]> Thu, 23 Jun 2005 13:14:50 +0000
| Newsgroups | gmane.comp.sysutils.backup.faubackup.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/faubackup/faubackup2/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25067/src/common
Modified Files:
system_calls.cpp
Log Message:
preserve times on bsd systems
Index: system_calls.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/system_calls.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** system_calls.cpp 21 Jun 2005 09:16:45 -0000 1.8
--- system_calls.cpp 23 Jun 2005 13:14:48 -0000 1.9
***************
*** 14,17 ****
--- 14,18 ----
#include <unistd.h>
#include <utime.h>
+ #include <time.h>
#include <fcntl.h>
#include <stdint.h>
***************
*** 200,205 ****
--- 201,211 ----
if( flags & SET_TIME )
{
+ #ifdef HAVE_TIME2POSIX
+ u.actime = posix2time(st.st_atime);
+ u.modtime = posix2time(st.st_mtime);
+ #else
u.actime = st.st_atime;
u.modtime = st.st_mtime;
+ #endif
ret = utime( path.c_str(), &u );
if( ret < 0 ) {
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click