Commit f0a9ee30 authored by Rafaël Carré's avatar Rafaël Carré

Do not try to load non-existing skins files

parent d10a9a06
...@@ -75,9 +75,16 @@ int makedir( const char *newdir ); ...@@ -75,9 +75,16 @@ int makedir( const char *newdir );
bool ThemeLoader::load( const string &fileName ) bool ThemeLoader::load( const string &fileName )
{ {
string path = getFilePath( fileName );
//Before all, let's see if the file is present
struct stat p_stat;
if( utf8_stat( path.c_str(), &p_stat ) )
return false;
// First, we try to un-targz the file, and if it fails we hope it's a XML // First, we try to un-targz the file, and if it fails we hope it's a XML
// file... // file...
string path = getFilePath( fileName );
#if defined( HAVE_ZLIB_H ) #if defined( HAVE_ZLIB_H )
if( ! extract( sToLocale( fileName ) ) && ! parse( path, fileName ) ) if( ! extract( sToLocale( fileName ) ) && ! parse( path, fileName ) )
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment