X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bfile%2Fmfile.c;h=002a3f966bfec4d2780d796aa92627bf7b543372;hb=c76d814c4ebc9ec7fc962c900cb4b48ed58a4f30;hp=9a9793c820c6909b53893d1e2cce78cf25026b21;hpb=42632d1251eba8a9b158625dff3344fc747b2b17;p=idzebra-moved-to-github.git diff --git a/bfile/mfile.c b/bfile/mfile.c index 9a9793c..002a3f9 100644 --- a/bfile/mfile.c +++ b/bfile/mfile.c @@ -1,10 +1,26 @@ -/* - * Copyright (C) 1994-2002, Index Data - * All rights reserved. - * Sebastian Hammer, Adam Dickmeiss - * - * $Id: mfile.c,v 1.45 2002-07-09 10:05:31 adam Exp $ - */ +/* $Id: mfile.c,v 1.49 2002-08-02 19:26:55 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 + Index Data Aps + +This file is part of the Zebra server. + +Zebra is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + + /* @@ -248,6 +264,9 @@ MFile_area mf_init(const char *name, const char *spec, const char *base) dent->d_name); return 0; } +#ifndef WIN32 + fsync(fd); +#endif close(fd); if (dirp->max_bytes >= 0) dirp->avail_bytes -= part_f->bytes; @@ -410,6 +429,9 @@ int mf_close(MFile mf) for (i = 0; i < mf->no_files; i++) if (mf->files[i].fd >= 0) { +#ifndef WIN32 + fsync(mf->files[i].fd); +#endif close(mf->files[i].fd); mf->files[i].fd = -1; }