File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,14 @@ def unload(self):
110
110
self .menu .deleteLater ()
111
111
#delete temporary output files
112
112
folder = SextanteUtils .tempFolder ()
113
- for f in os .listdir (folder ):
114
- path = os .path .join (folder ,f )
115
- try :
116
- os .unlink (path )
117
- except :
118
- #leave files that could not be deleted
119
- pass
113
+ if QDir (folder ).exists ():
114
+ for f in os .listdir (folder ):
115
+ path = os .path .join (folder , f )
116
+ try :
117
+ os .unlink (path )
118
+ except :
119
+ #leave files that could not be deleted
120
+ pass
120
121
121
122
def openToolbox (self ):
122
123
if self .toolbox .isVisible ():
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def userFolder():
40
40
if not QDir (userDir ).exists ():
41
41
QDir ().mkpath (userDir )
42
42
43
- return unicode (userDir )
43
+ return unicode (QDir . toNativeSeparators ( userDir ) )
44
44
45
45
@staticmethod
46
46
def isWindows ():
@@ -52,11 +52,11 @@ def isMac():
52
52
53
53
@staticmethod
54
54
def tempFolder ():
55
- tempDir = QFileInfo ( QgsApplication . qgisUserDbFilePath ()). path () + "/ sextante/tempdata"
55
+ tempDir = os . path . join ( unicode ( QDir . tempPath ()), " sextante" )
56
56
if not QDir (tempDir ).exists ():
57
57
QDir ().mkpath (tempDir )
58
58
59
- return unicode (tempDir )
59
+ return unicode (os . path . abspath ( tempDir ) )
60
60
61
61
@staticmethod
62
62
def setTempOutput (out , alg ):
You can’t perform that action at this time.
0 commit comments