mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[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.
This commit is contained in:
parent
89d4998510
commit
4feeab85a5
@ -45,6 +45,8 @@ class RUtils(object):
|
||||
R_USE64 = 'R_USE64'
|
||||
R_LIBS_USER = 'R_LIBS_USER'
|
||||
|
||||
rscriptfilename = userFolder() + os.sep + 'processing_script.r'
|
||||
|
||||
@staticmethod
|
||||
def RFolder():
|
||||
folder = ProcessingConfig.getSetting(RUtils.R_FOLDER)
|
||||
@ -108,7 +110,7 @@ class RUtils(object):
|
||||
|
||||
@staticmethod
|
||||
def getRScriptFilename():
|
||||
return userFolder() + os.sep + 'processing_script.r'
|
||||
return RUtils.rscriptfilename
|
||||
|
||||
@staticmethod
|
||||
def getConsoleOutputFilename():
|
||||
@ -116,6 +118,9 @@ class RUtils(object):
|
||||
|
||||
@staticmethod
|
||||
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()
|
||||
RUtils.createRScriptFromRCommands(alg.getFullSetOfRCommands())
|
||||
if isWindows():
|
||||
|
Loading…
x
Reference in New Issue
Block a user