From 9f78587f71e6bcb32035b328f81a43b297c8eb17 Mon Sep 17 00:00:00 2001 From: jmarcus Date: Mon, 20 May 2002 15:03:19 +0000 Subject: [PATCH] Fix problem with saving files. Submitted by: didier --- etc/afpd/file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/afpd/file.c b/etc/afpd/file.c index 6b4406a5..58adb130 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -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; } -- 2.39.2