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 16
16
* *
17
17
***************************************************************************
18
18
"""
19
- from processing .tools import dataobjects
20
-
21
19
22
20
__author__ = 'Victor Olaya'
23
21
__date__ = 'August 2012'
34
32
from processing .core .GeoAlgorithm import GeoAlgorithm
35
33
from processing .algs .gdal .GdalAlgorithmDialog import GdalAlgorithmDialog
36
34
from processing .algs .gdal .GdalUtils import GdalUtils
35
+ from processing .tools import dataobjects
37
36
38
37
pluginPath = os .path .normpath (os .path .join (
39
38
os .path .split (os .path .dirname (__file__ ))[0 ], os .pardir ))
@@ -59,7 +58,7 @@ def processAlgorithm(self, progress):
59
58
c = c .replace (layer .source (), exported )
60
59
if os .path .isfile (layer .source ()):
61
60
fileName = os .path .splitext (os .path .split (layer .source ())[1 ])[0 ]
62
- c = c .replace (fileName , exportedFileName )
61
+ c = c .replace (' ' + fileName + ' ' , ' ' + exportedFileName + ' ' )
63
62
64
63
commands [i ] = c
65
64
GdalUtils .runGdal (commands , progress )
Original file line number Diff line number Diff line change @@ -290,18 +290,7 @@ def exportVectorLayer(layer, supported=None):
290
290
settings = QSettings ()
291
291
systemEncoding = settings .value ('/UI/encoding' , 'System' )
292
292
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' )
305
294
provider = layer .dataProvider ()
306
295
useSelection = ProcessingConfig .getSetting (ProcessingConfig .USE_SELECTED )
307
296
if useSelection and layer .selectedFeatureCount () != 0 :
You can’t perform that action at this time.
0 commit comments