File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
python/plugins/processing Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change 1616* *
1717***************************************************************************
1818"""
19- from processing .tools import dataobjects
20-
2119
2220__author__ = 'Victor Olaya'
2321__date__ = 'August 2012'
3432from processing .core .GeoAlgorithm import GeoAlgorithm
3533from processing .algs .gdal .GdalAlgorithmDialog import GdalAlgorithmDialog
3634from processing .algs .gdal .GdalUtils import GdalUtils
35+ from processing .tools import dataobjects
3736
3837pluginPath = os .path .normpath (os .path .join (
3938 os .path .split (os .path .dirname (__file__ ))[0 ], os .pardir ))
@@ -59,7 +58,7 @@ def processAlgorithm(self, progress):
5958 c = c .replace (layer .source (), exported )
6059 if os .path .isfile (layer .source ()):
6160 fileName = os .path .splitext (os .path .split (layer .source ())[1 ])[0 ]
62- c = c .replace (fileName , exportedFileName )
61+ c = c .replace (' ' + fileName + ' ' , ' ' + exportedFileName + ' ' )
6362
6463 commands [i ] = c
6564 GdalUtils .runGdal (commands , progress )
Original file line number Diff line number Diff line change @@ -290,18 +290,7 @@ def exportVectorLayer(layer, supported=None):
290290 settings = QSettings ()
291291 systemEncoding = settings .value ('/UI/encoding' , 'System' )
292292
293- filename = os .path .basename (unicode (layer .source ()))
294- idx = filename .rfind ('.' )
295- if idx != - 1 :
296- filename = filename [:idx ]
297-
298- filename = unicode (layer .name ())
299- validChars = \
300- 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:'
301- filename = '' .join (c for c in filename if c in validChars )
302- if len (filename ) == 0 :
303- filename = 'layer'
304- output = getTempFilenameInTempFolder (filename + '.shp' )
293+ output = getTempFilename ('shp' )
305294 provider = layer .dataProvider ()
306295 useSelection = ProcessingConfig .getSetting (ProcessingConfig .USE_SELECTED )
307296 if useSelection and layer .selectedFeatureCount () != 0 :
You can’t perform that action at this time.
0 commit comments