Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added path check for metadata.json through Attica.

  • Loading branch information...
commit 8cc52bca7593f35753b348bb7c6adcfb0ad4bfe7 1 parent 2d57f6c
@teo teo authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/libtomahawk/accounts/ResolverAccount.cpp
View
8 src/libtomahawk/accounts/ResolverAccount.cpp
@@ -81,8 +81,12 @@ ResolverAccountFactory::createFromPath( const QString& path, const QString& fact
if ( dir.cdUp() && dir.cdUp() ) //go up twice to the content dir, if any
{
QString metadataFilePath = dir.absoluteFilePath( "metadata.json" );
- configuration = metadataFromJsonFile( metadataFilePath );
- expandPaths( dir, configuration );
+ QFileInfo metadataFileInfo( metadataFilePath );
+ if ( metadataFileInfo.isFile() && metadataFileInfo.isReadable() )
+ {
+ configuration = metadataFromJsonFile( metadataFilePath );
+ expandPaths( dir, configuration );
+ }
}
return new AtticaResolverAccount( generateId( factory ), path, pathInfo.baseName(), configuration );
}
Please sign in to comment.
Something went wrong with that request. Please try again.