Skip to content

Commit

Permalink
Fix relative paths for offline editing
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 11, 2016
1 parent d5128d2 commit 1a7a87b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsofflineediting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString& offlineDataPath,
projectTitle += " (offline)";
QgsProject::instance()->setTitle( projectTitle );

QgsProject::instance()->writeEntry( PROJECT_ENTRY_SCOPE_OFFLINE, PROJECT_ENTRY_KEY_OFFLINE_DB_PATH, dbPath );
QgsProject::instance()->writeEntry( PROJECT_ENTRY_SCOPE_OFFLINE, PROJECT_ENTRY_KEY_OFFLINE_DB_PATH, QgsProject::instance()->writePath( dbPath ) );

return true;
}
Expand Down Expand Up @@ -915,7 +915,8 @@ sqlite3* QgsOfflineEditing::openLoggingDb()
QString dbPath = QgsProject::instance()->readEntry( PROJECT_ENTRY_SCOPE_OFFLINE, PROJECT_ENTRY_KEY_OFFLINE_DB_PATH );
if ( !dbPath.isEmpty() )
{
int rc = sqlite3_open( dbPath.toUtf8().constData(), &db );
QString absoluteDbPath = QgsProject::instance()->readPath( dbPath );
int rc = sqlite3_open( absoluteDbPath.toUtf8().constData(), &db );
if ( rc != SQLITE_OK )
{
showWarning( tr( "Could not open the spatialite logging database" ) );
Expand Down

0 comments on commit 1a7a87b

Please sign in to comment.