Skip to content
Permalink
Browse files

Fix relative paths for offline editing

  • Loading branch information
m-kuhn committed Jul 5, 2016
1 parent 102ba2d commit e4a69234d41e84986d3f6f58847ffff30bd0fcd0
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsofflineediting.cpp
@@ -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;
}
@@ -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" );

0 comments on commit e4a6923

Please sign in to comment.
You can’t perform that action at this time.