File tree 3 files changed +18
-3
lines changed
python/plugins/processing/algs
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ def grassPath():
87
87
return ''
88
88
89
89
folder = ProcessingConfig .getSetting (GrassUtils .GRASS_FOLDER )
90
+ if not os .path .exists (folder ):
91
+ folder = None
90
92
if folder is None :
91
93
if isWindows ():
92
94
testfolder = os .path .dirname (QgsApplication .prefixPath ())
@@ -106,6 +108,8 @@ def grassPath():
106
108
@staticmethod
107
109
def grassWinShell ():
108
110
folder = ProcessingConfig .getSetting (GrassUtils .GRASS_WIN_SHELL )
111
+ if not os .path .exists (folder ):
112
+ folder = None
109
113
if folder is None :
110
114
folder = os .path .dirname (unicode (QgsApplication .prefixPath ()))
111
115
folder = os .path .join (folder , 'msys' )
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ def grassPath():
85
85
return ''
86
86
87
87
folder = ProcessingConfig .getSetting (Grass7Utils .GRASS_FOLDER )
88
+ if not os .path .exists (folder ):
89
+ folder = None
88
90
if folder is None :
89
91
if isWindows ():
90
92
testfolder = os .path .dirname (unicode (QgsApplication .prefixPath ()))
@@ -104,6 +106,8 @@ def grassPath():
104
106
@staticmethod
105
107
def grassWinShell ():
106
108
folder = ProcessingConfig .getSetting (Grass7Utils .GRASS_WIN_SHELL )
109
+ if not os .path .exists (folder ):
110
+ folder = None
107
111
if folder is None :
108
112
folder = os .path .dirname (unicode (QgsApplication .prefixPath ()))
109
113
folder = os .path .join (folder , 'msys' )
Original file line number Diff line number Diff line change @@ -56,16 +56,23 @@ def RLibs():
56
56
folder = ProcessingConfig .getSetting (RUtils .R_LIBS_USER )
57
57
if folder is None :
58
58
folder = unicode (os .path .join (userFolder (), 'rlibs' ))
59
- mkdir (folder )
60
-
59
+ try :
60
+ mkdir (folder )
61
+ except :
62
+ folder = unicode (os .path .join (userFolder (), 'rlibs' ))
63
+ mkdir (folder )
61
64
return os .path .abspath (unicode (folder ))
62
65
63
66
@staticmethod
64
67
def RScriptsFolder ():
65
68
folder = ProcessingConfig .getSetting (RUtils .RSCRIPTS_FOLDER )
66
69
if folder is None :
67
70
folder = unicode (os .path .join (userFolder (), 'rscripts' ))
68
- mkdir (folder )
71
+ try :
72
+ mkdir (folder )
73
+ except :
74
+ folder = unicode (os .path .join (userFolder (), 'rscripts' ))
75
+ mkdir (folder )
69
76
70
77
return os .path .abspath (folder )
71
78
You can’t perform that action at this time.
0 commit comments