Skip to content
Permalink
Browse files

fixed #5697 (temp files naming)

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@202 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf
volayaf committed Jun 1, 2012
1 parent f56be03 commit cd4b9fe3e1dc1f991e8f090216719b8f9b4c343e
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/sextante/core/SextanteUtils.py
@@ -30,9 +30,10 @@ def tempFolder():

@staticmethod
def setTempOutput(out, alg):
seconds = str(time.time())
ext = out.getDefaultFileExtension(alg)
filename = SextanteUtils.tempFolder() + os.sep + seconds + str(SextanteUtils.NUM_EXPORTED) + "." + ext
validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
safeCmdName = ''.join(c for c in alg.commandLineName() if c in validChars)
filename = SextanteUtils.tempFolder() + os.sep + safeCmdName + str(SextanteUtils.NUM_EXPORTED) + "." + ext
out.value = filename
SextanteUtils.NUM_EXPORTED += 1

0 comments on commit cd4b9fe

Please sign in to comment.
You can’t perform that action at this time.