Permalink
Browse files

fixed #593 save of empty meta for RT index

  • Loading branch information...
tomatolog committed Jan 10, 2019
1 parent 33b4573 commit bf4e9ea27c349cdc9ae4e54e960a4a17b90e38fa
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/sphinxrt.cpp
@@ -3957,7 +3957,14 @@ void RtIndex_t::SaveMeta ( int64_t iTID, const CSphFixedVector<int> & dChunkName
wrMeta.PutDword ( dChunkNames.GetLength () );
wrMeta.PutBytes ( dChunkNames.Begin(), dChunkNames.GetLengthBytes() );

wrMeta.CloseFile(); // FIXME? handle errors?
wrMeta.CloseFile();

// no need to remove old but good meta in case new meta failed to save
if ( wrMeta.IsError() )
{
sphWarning ( "%s", sError.cstr() );
return;
}

// rename
if ( sph::rename ( sMetaNew.cstr(), sMeta.cstr() ) )

0 comments on commit bf4e9ea

Please sign in to comment.