Skip to content

Commit cd4b9fe

Browse files
author
volayaf
committed
fixed #5697 (temp files naming)
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@202 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent f56be03 commit cd4b9fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sextante/core/SextanteUtils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ def tempFolder():
3030

3131
@staticmethod
3232
def setTempOutput(out, alg):
33-
seconds = str(time.time())
3433
ext = out.getDefaultFileExtension(alg)
35-
filename = SextanteUtils.tempFolder() + os.sep + seconds + str(SextanteUtils.NUM_EXPORTED) + "." + ext
34+
validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
35+
safeCmdName = ''.join(c for c in alg.commandLineName() if c in validChars)
36+
filename = SextanteUtils.tempFolder() + os.sep + safeCmdName + str(SextanteUtils.NUM_EXPORTED) + "." + ext
3637
out.value = filename
3738
SextanteUtils.NUM_EXPORTED += 1
3839

0 commit comments

Comments
 (0)