From: bfernhomberg Date: Thu, 18 Sep 2003 19:24:54 +0000 (+0000) Subject: MFH: Set the volume creation time from the first stat call done in openvol -before... X-Git-Tag: netatalk-1-6-4rc1~20 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=9fda48cc1d28abc09e88dc6dcaa7d22a6d0b2869 MFH: Set the volume creation time from the first stat call done in openvol -before we touched the volume-, this should fix the duplicate creation times problem. One race left: If the dirs have been created at exactly the same second in unix, we're screwed --- diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 1bc29970..68fb8351 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.36.2.4 2003-06-14 16:56:27 srittau Exp $ + * $Id: volume.c,v 1.36.2.5 2003-09-18 19:24:54 bfernhomberg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -952,6 +952,7 @@ int *buflen; ad_setentrylen( &ad, ADEID_NAME, strlen( slash )); memcpy(ad_entry( &ad, ADEID_NAME ), slash, ad_getentrylen( &ad, ADEID_NAME )); + ad_setdate(ad, AD_DATE_CREATE | AD_DATE_UNIX, st->st_mtime); ad_flush(&ad, ADFLAGS_HF); }