]> arthur.barton.de Git - netatalk.git/commitdiff
Fix problem with saving files.
authorjmarcus <jmarcus>
Mon, 20 May 2002 15:03:19 +0000 (15:03 +0000)
committerjmarcus <jmarcus>
Mon, 20 May 2002 15:03:19 +0000 (15:03 +0000)
Submitted by: didier <dgautheron@magic.fr>

etc/afpd/file.c

index 6b4406a564fc6bf1c3256cecb1b83843396cbe8d..58adb13095bf633b2df5c3c5a0fa740d3ce8f089 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.44 2002-05-13 04:59:36 jmarcus Exp $
+ * $Id: file.c,v 1.45 2002-05-20 15:03:19 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -459,6 +459,12 @@ int                ibuflen, *rbuflen;
             return AFPERR_BUSY;
         openf = O_RDWR|O_CREAT|O_TRUNC;
     } else {
+       /* on a soft create, if the file is open then ad_open won't failed 
+          because open syscall is not called
+       */
+       if (of) {
+               return AFPERR_EXIST;
+       }
         openf = O_RDWR|O_CREAT|O_EXCL;
     }