Skip to content
Permalink
Browse files

[processing] don't use temp folder for default output folder

  • Loading branch information
volaya committed Nov 6, 2015
1 parent 54bdcef commit 4692eb526bd86eadf1b80fe478d4ec910f202515
Showing with 9 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/core/ProcessingConfig.py
  2. +6 −0 python/plugins/processing/tools/system.py
@@ -29,13 +29,13 @@

from PyQt4.QtCore import QPyNullVariant, QCoreApplication, QSettings
from PyQt4.QtGui import QIcon
from processing.tools.system import tempFolder
from processing.tools.system import defaultOutputFolder
import processing.tools.dataobjects


class ProcessingConfig:

OUTPUT_FOLDER = 'OUTPUT_FOLDER'
OUTPUT_FOLDER = 'OUTPUTS_FOLDER'
RASTER_STYLE = 'RASTER_STYLE'
VECTOR_POINT_STYLE = 'VECTOR_POINT_STYLE'
VECTOR_LINE_STYLE = 'VECTOR_LINE_STYLE'
@@ -83,7 +83,7 @@ def initialize():
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
ProcessingConfig.OUTPUT_FOLDER,
ProcessingConfig.tr('Output folder'), tempFolder(),
ProcessingConfig.tr('Output folder'), defaultOutputFolder(),
valuetype=Setting.FOLDER))
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
@@ -45,6 +45,12 @@ def userFolder():

return unicode(QDir.toNativeSeparators(userDir))

def defaultOutputFolder():
folder = os.path.join(os.path.dirname(QgsApplication.qgisUserDbFilePath()), "processing", "outputs")
if not QDir(folder).exists():
QDir().mkpath(folder)

return unicode(QDir.toNativeSeparators(folder))

def isWindows():
return os.name == 'nt'

0 comments on commit 4692eb5

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