Skip to content

Commit

Permalink
fixed remote snippets to check empty path first; fixing windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatolog committed Sep 2, 2019
1 parent 5cf6741 commit 62f64cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sphinxexcerpt.cpp
Expand Up @@ -3789,13 +3789,13 @@ void SnippetContext_t::BuildExcerpt ( ExcerptQuery_t & tOptions, const CSphIndex
sError.SetSprintf( "File '%s' escapes '%s' scope", sFilename.scstr(), g_sSnippetsFilePrefix.scstr());
return;
}
if ( !sFilename.IsEmpty () && tFile.Open ( sFilename.cstr(), SPH_O_READ, sError )<0 )
return;
else if ( tOptions.m_sSource.IsEmpty() )
if ( tOptions.m_sSource.IsEmpty() )
{
sError.SetSprintf ( "snippet file name is empty" );
return;
}
if ( !sFilename.IsEmpty () && tFile.Open ( sFilename.cstr(), SPH_O_READ, sError )<0 )
return;

// will this ever trigger? time will tell; email me if it does!
if ( tFile.GetSize()+1>=(SphOffset_t)INT_MAX )
Expand Down

0 comments on commit 62f64cb

Please sign in to comment.