-/* $Id: mfile.c,v 1.72 2006-12-03 16:05:13 adam Exp $
+/* $Id: mfile.c,v 1.73 2006-12-19 13:17:34 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
mf_destroy(ma);
return 0;
}
-#ifndef WIN32
- fsync(fd);
-#endif
close(fd);
if (dirp->max_bytes >= 0)
dirp->avail_bytes -= part_f->bytes;
if (mf->files[i].fd >= 0)
{
#ifndef WIN32
- fsync(mf->files[i].fd);
+ if (mf->wr)
+ fsync(mf->files[i].fd);
#endif
close(mf->files[i].fd);
mf->files[i].fd = -1;