mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
fix: illege mdx dictionary ,css file embed font with a lead dot,such as "./font.woff"
the leading dot character will cause the file can not be found.
This commit is contained in:
parent
cf10810fe2
commit
a37a24671c
3
mdx.cc
3
mdx.cc
|
@ -827,6 +827,9 @@ void MddResourceRequest::run()
|
||||||
|
|
||||||
// Convert to the Windows separator
|
// Convert to the Windows separator
|
||||||
std::replace( resourceName.begin(), resourceName.end(), '/', '\\' );
|
std::replace( resourceName.begin(), resourceName.end(), '/', '\\' );
|
||||||
|
if(resourceName[0]=='.'){
|
||||||
|
resourceName.erase(0,1);
|
||||||
|
}
|
||||||
if ( resourceName[ 0 ] != '\\' )
|
if ( resourceName[ 0 ] != '\\' )
|
||||||
{
|
{
|
||||||
resourceName.insert( 0, 1, '\\' );
|
resourceName.insert( 0, 1, '\\' );
|
||||||
|
|
Loading…
Reference in a new issue