Limit size of images in root folder of dsl dictionary

This commit is contained in:
Abs62 2012-12-07 21:29:10 +04:00
parent 00cb5c8d20
commit 0408201f37

18
dsl.cc
View file

@ -795,11 +795,21 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node )
}
catch( File::exCantOpen & )
{
// Try reading from zip file
if ( resourceZip.isOpen() )
try
{
Mutex::Lock _( resourceZipMutex );
resourceZip.loadFile( Utf8::decode( filename ), imgdata );
n = FsEncoding::dirname( getDictionaryFilenames()[ 0 ] ) +
FsEncoding::separator() +
FsEncoding::encode( filename );
File::loadFromFile( n, imgdata );
}
catch( File::exCantOpen & )
{
// Try reading from zip file
if ( resourceZip.isOpen() )
{
Mutex::Lock _( resourceZipMutex );
resourceZip.loadFile( Utf8::decode( filename ), imgdata );
}
}
}
catch(...)