mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
Limit size of images in root folder of dsl dictionary
This commit is contained in:
parent
00cb5c8d20
commit
0408201f37
18
dsl.cc
18
dsl.cc
|
@ -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(...)
|
||||
|
|
Loading…
Reference in a new issue