Skip to content

Commit a56c957

Browse files
committedMar 12, 2013
[sextante] fixed problem in Split RGB bands algorithm
1 parent dd85786 commit a56c957

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎python/plugins/sextante/saga/SplitRGBBands.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ def defineCharacteristics(self):
5353
def processAlgorithm(self, progress):
5454
#TODO:check correct num of bands
5555
input = self.getParameterValue(SplitRGBBands.INPUT)
56-
temp = SextanteUtils.getTempFilename();
56+
temp = SextanteUtils.getTempFilename(None).replace('.','');
57+
basename = os.path.basename(temp)
58+
validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
59+
safeBasename = ''.join(c for c in basename if c in validChars)
60+
temp = os.path.join(os.path.dirname(temp), safeBasename)
61+
5762
r = self.getOutputValue(SplitRGBBands.R)
5863
g = self.getOutputValue(SplitRGBBands.G)
5964
b = self.getOutputValue(SplitRGBBands.B)

0 commit comments

Comments
 (0)
Please sign in to comment.