]> arthur.barton.de Git - netatalk.git/commitdiff
implemented Sebastian Rittau's change to avoid overwriting AppleDouble headers
authorrufustfirefly <rufustfirefly>
Mon, 4 Jun 2001 19:06:15 +0000 (19:06 +0000)
committerrufustfirefly <rufustfirefly>
Mon, 4 Jun 2001 19:06:15 +0000 (19:06 +0000)
etc/afpd/fork.c

index d245b1c3cbccf14a5205965f2773802d70cc051a..9a05b6c2f0f3160568c6830ec419753f0dcb008f 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: fork.c,v 1.4 2001-06-04 19:06:15 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
@@ -966,9 +968,10 @@ int flushfork( ofork )
        }
 
 
-       /* flush the header. */
-       if (doflush && (ad_flush(ofork->of_ad, ADFLAGS_HF) < 0)) 
-         err = -1;
+       /* flush the header (if it is a resource fork) */
+       if (ofork->of_flags & AFPFORK_RSRC)
+         if (doflush && (ad_flush(ofork->of_ad, ADFLAGS_HF) < 0)) 
+           err = -1;
          
        if (fsync( ad_hfileno( ofork->of_ad )) < 0)
          err = -1;