Bug report #19655

Updated by Jürgen Fischer over 3 years ago

When using ogrinfo from the GDAL tools with a file path which contains char '-' and empty characters, the command is not correctly executed. Shouldn't the path in the GDAL command be surrounded by quotation marks?

<pre> @
Processing algorithm…
Algorithmus Vektorinformation startet…
Input parameters:
{ 'INPUT' : 'D:/OneDrive - Test/_Projekte/20180712_GisImporter_Shape/Sections/FOC_Sections.shp', 'NO_METADATA' : False, 'OUTPUT' : 'C:/Users/username/AppData/Local/Temp/processing_9978832b89694b56ad3001db50da2fbc/5df334e2e1054468a4976fa2b555f4bc/OUTPUT.html', 'SUMMARY_ONLY' : True }

GDAL command:
ogrinfo -al -so D:\OneDrive - Dynamic Design Informationssysteme GmbH\_Projekte\20180712_GisImporter_Shape\Sections\FOC_Sections.shp
GDAL command output:

FAILURE: Unknown option name '-'

Usage: ogrinfo [--help-general] [-ro] [-q] [-where restricted_where|@filename]

[-spat xmin ymin xmax ymax] [-geomfield field] [-fid fid]

[-sql statement|@filename] [-dialect sql_dialect] [-al] [-rl] [-so] [-fields={YES/NO}]

[-geom={YES/NO/SUMMARY}] [-formats] [[-oo NAME=VALUE] ...]

[-nomd] [-listmdd] [-mdd domain|`all`]*

[-nocount] [-noextent]

datasource_name [layer [layer ...]]

Execution completed in 0.14 seconds
Results:
{'OUTPUT': 'C:/Users/tanja/AppData/Local/Temp/processing_9978832b89694b56ad3001db50da2fbc/5df334e2e1054468a4976fa2b555f4bc/OUTPUT.html'}
</pre> @

Version Information:
<pre> @
QGIS-Version
3.2.2-Bonn
QGIS-Codeversion commit:26842169e9
26842169e9
Kompiliert gegen Qt
5.9.2
Laufendes Qt
5.9.2
Kompiliert mit GDAL/OGR
2.2.4
Läuft mit GDAL/OGR
2.2.4
Kompiliert mit GEOS
3.6.1-CAPI-1.10.1
Läuft mit GEOS
3.6.1-CAPI-1.10.1 r0
PostgreSQL-Client-Version
9.2.4
SpatiaLite-Version
4.3.0
QWT-Version
6.1.3
QScintilla2-Version
2.10.1
PROJ.4-Version
493
</pre> @

Back