Skip to content

Commit

Permalink
[processing] don't use temp folder for default output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Nov 6, 2015
1 parent 54bdcef commit 4692eb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/core/ProcessingConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions python/plugins/processing/tools/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 4692eb5

Please sign in to comment.