Skip to content

Commit 8006e3c

Browse files
author
jef
committed
fix #2202
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12343 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4bc0811 commit 8006e3c

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/plugins/gps_importer/qgsbabelformat.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ QStringList QgsBabelCommand::importCommand( const QString& babel,
147147
else if ( *iter == "%type" )
148148
copy.append( featuretype );
149149
else if ( *iter == "%in" )
150-
copy.append( input );
150+
copy.append( QString("\"%1\"").arg( input ) );
151151
else if ( *iter == "%out" )
152-
copy.append( output );
152+
copy.append( QString("\"%1\"").arg( output ) );
153153
else
154154
copy.append( *iter );
155155
}
@@ -171,9 +171,9 @@ QStringList QgsBabelCommand::exportCommand( const QString& babel,
171171
else if ( *iter == "%type" )
172172
copy.append( featuretype );
173173
else if ( *iter == "%in" )
174-
copy.append( input );
174+
copy.append( QString("\"%1\"").arg( input ) );
175175
else if ( *iter == "%out" )
176-
copy.append( output );
176+
copy.append( QString("\"%1\"").arg( output ) );
177177
else
178178
copy.append( *iter );
179179
}

src/plugins/gps_importer/qgsgpsdevice.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ QStringList QgsGPSDevice::importCommand( const QString& babel,
5858
else if ( *iter == "%type" )
5959
copy.append( type );
6060
else if ( *iter == "%in" )
61-
copy.append( in );
61+
copy.append( QString( "\"%1\"").arg( in ) );
6262
else if ( *iter == "%out" )
63-
copy.append( out );
63+
copy.append( QString( "\"%1\"").arg( out ) );
6464
else
6565
copy.append( *iter );
6666
}
@@ -90,9 +90,9 @@ QStringList QgsGPSDevice::exportCommand( const QString& babel,
9090
else if ( *iter == "%type" )
9191
copy.append( type );
9292
else if ( *iter == "%in" )
93-
copy.append( in );
93+
copy.append( QString("\"%1\"").arg( in ) );
9494
else if ( *iter == "%out" )
95-
copy.append( out );
95+
copy.append( QString("\"%1\"").arg( out ) );
9696
else
9797
copy.append( *iter );
9898
}

src/plugins/gps_importer/qgsgpsplugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ void QgsGPSPlugin::convertGPSFile( QString inputFileName,
329329

330330
// try to start the gpsbabel process
331331
QStringList babelArgs;
332-
babelArgs << mBabelPath << "-i" << "gpx" << "-f" << inputFileName
333-
<< convertStrings << "-o" << "gpx" << "-F" << outputFileName;
332+
babelArgs << mBabelPath << "-i" << "gpx" << "-f" << QString("\"%1\"").arg( inputFileName )
333+
<< convertStrings << "-o" << "gpx" << "-F" << QString("\"%1\"").arg( outputFileName );
334334
QgsDebugMsg( QString( "Conversion command: " ) + babelArgs.join( "|" ) );
335335

336336
QProcess babelProcess;

0 commit comments

Comments
 (0)