Skip to content


Browse files Browse the repository at this point in the history
[Processing][Rscripts] Use temp script filename
The build RScript is stored in the User folder, so the script is erased at each RAlgorithm execute.
Server side or for debugging this could be a problem.
So processing_script.r will be stored in temp folder.
  • Loading branch information
rldhont committed Sep 28, 2016
1 parent 89d4998 commit 4feeab8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/plugins/processing/algs/r/
Expand Up @@ -45,6 +45,8 @@ class RUtils(object):
R_USE64 = 'R_USE64'

rscriptfilename = userFolder() + os.sep + 'processing_script.r'

def RFolder():
folder = ProcessingConfig.getSetting(RUtils.R_FOLDER)
Expand Down Expand Up @@ -108,14 +110,17 @@ def createRScriptFromRCommands(commands):

def getRScriptFilename():
return userFolder() + os.sep + 'processing_script.r'
return RUtils.rscriptfilename

def getConsoleOutputFilename():
return RUtils.getRScriptFilename() + '.Rout'

def executeRAlgorithm(alg, progress):
# generate new R script file name in a temp folder
RUtils.rscriptfilename = getTempFilenameInTempFolder('processing_script.r')
# run commands
RUtils.verboseCommands = alg.getVerboseCommands()
if isWindows():
Expand Down

0 comments on commit 4feeab8

Please sign in to comment.