summaryrefslogtreecommitdiffstats
path: root/source/lib/system.c
diff options
context:
space:
mode:
authorcvs2svn Import User <samba-bugs@samba.org>1997-10-21 16:43:44 +0000
committercvs2svn Import User <samba-bugs@samba.org>1997-10-21 16:43:44 +0000
commit46a05ffe430b3db815d567f09b0f293b2a9bd269 (patch)
tree1a63a7ef14f516dbdc1bbbc0ff2cedf1a0070bd1 /source/lib/system.c
parent332f78bbc945c327069e9c9e29c7137c8cbd5c02 (diff)
parent460186a1b4de8ddeebe9d37faafd9b5b321ee493 (diff)
downloadsamba-1.9.17p4.tar.gz
samba-1.9.17p4.tar.xz
samba-1.9.17p4.zip
This commit was manufactured by cvs2svn to create tagsamba-1.9.17p4
'release-1-9-17p4'.
Diffstat (limited to 'source/lib/system.c')
-rw-r--r--source/lib/system.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index fe8e8004d04..b149ccb4b98 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -194,15 +194,25 @@ now for utime()
********************************************************************/
int sys_utime(char *fname,struct utimbuf *times)
{
- return(utime(dos_to_unix(fname,False),times));
+ /* if the modtime is 0 or -1 then ignore the call and
+ return success */
+ if (times->modtime == (time_t)0 || times->modtime == (time_t)-1)
+ return 0;
+
+ /* if the access time is 0 or -1 then set it to the modtime */
+ if (times->actime == (time_t)0 || times->actime == (time_t)-1)
+ times->actime = times->modtime;
+
+ return(utime(dos_to_unix(fname,False),times));
}
+
/*********************************************************
for rename across filesystems Patch from Warren Birnbaum
<warrenb@hpcvscdp.cv.hp.com>
**********************************************************/
-
-static int copy_reg(char *source, const char *dest)
+static int
+copy_reg (const char *source, const char *dest)
{
struct stat source_stats;
int ifd;