if ( installType == Binaries ) { // 'Binary' installation type
// check binaries directory
QFileInfo fib( QDir::cleanDirPath( getBinPath() ) );
- if ( !fib.exists() ) {
+ if ( !fib.isDir() ) {
QMessageBox::warning( this,
tr( "Warning" ),
tr( "The directory %1 doesn't exist.\n"
// check sources directory
QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) );
- if ( !fis.exists() )
+ if ( !fis.isDir() )
if ( QMessageBox::warning( this,
tr( "Warning" ),
tr( "The directory %1 doesn't exist.\n"
else { // 'Source' or 'Compile' installation type
// check sources directory
QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) );
- if ( !fis.exists() ) {
+ if ( !fis.isDir() ) {
QMessageBox::warning( this,
tr( "Warning" ),
tr( "The directory %1 doesn't exist.\n"
QMessageBox::NoButton );
return false;
}
+ else if ( !QDir( fis.filePath(), "*.tar.gz" ).count() ) {
+ QMessageBox::warning( this,
+ tr( "Warning" ),
+ tr( "The directory %1 doesn't contain source archives.\n" ).arg( fis.absFilePath() ),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ return false;
+ }
if ( platformsMap.find( curPlatform ) == platformsMap.end() ) {
QString aMsg = warnMsg + ".";
if ( installType == Compile )
return false;
}
QFileInfo fi( QDir::cleanDirPath( targetDir ) );
- if ( !fi.exists() ) {
+ if ( !fi.isDir() ) {
bool toCreate =
QMessageBox::warning( this,
tr( "Warning" ),