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 5, 2016
1 parent 102ba2d commit e4a6923
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 @@ -186,7 +186,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 @@ -942,7 +942,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 )
{
QgsDebugMsg( "Could not open the spatialite logging database" );
Expand Down

0 comments on commit e4a6923

Please sign in to comment.