diff --git a/src/core/qfieldcloudconnection.cpp b/src/core/qfieldcloudconnection.cpp index d4a47594b2..2a52361c56 100644 --- a/src/core/qfieldcloudconnection.cpp +++ b/src/core/qfieldcloudconnection.cpp @@ -561,6 +561,10 @@ QFieldCloudConnection::CloudError::CloudError( QNetworkReply *reply ) int QFieldCloudConnection::uploadPendingAttachments() { + qDebug() << "QFieldCloudConnection::uploadPendingAttachments()"; + qDebug() << "QFieldCloudConnection::uploadPendingAttachments()"; + qDebug() << "QFieldCloudConnection::uploadPendingAttachments()"; + qDebug() << "QFieldCloudConnection::uploadPendingAttachments()"; if ( mUploadPendingCount > 0 ) return mUploadPendingCount; diff --git a/src/core/qgismobileapp.cpp b/src/core/qgismobileapp.cpp index b9f003d4bd..c37c0b1d04 100644 --- a/src/core/qgismobileapp.cpp +++ b/src/core/qgismobileapp.cpp @@ -283,12 +283,19 @@ QgisMobileapp::QgisMobileapp( QgsApplication *app, QObject *parent ) if ( !dataDirs.isEmpty() ) { -#if defined( Q_OS_ANDROID ) || defined( Q_OS_IOS ) +#if !defined( Q_OS_ANDROID ) || !defined( Q_OS_IOS ) for ( const QString &dataDir : dataDirs ) { QFileInfo pgServiceFile( QStringLiteral( "%1/pg_service.conf" ).arg( dataDir ) ); if ( pgServiceFile.exists() && pgServiceFile.isReadable() ) { + QDir dir( dataDir ); + QStringList files = dir.entryList( QStringList() << QStringLiteral( "*.crt" ) << QStringLiteral( "*.key" ), QDir::Files ); + for ( const QString &file : files ) + { + qInfo() << QStringLiteral( "Tweaking permission for cert/key file %1" ).arg( file ); + QFile::setPermissions( QStringLiteral( "%1/%2" ).arg( dataDir, file ), QFileDevice::ReadOwner | QFileDevice::WriteOwner ); + } setenv( "PGSYSCONFDIR", dataDir.toUtf8(), true ); break; }