Hi devs,

I don't know if I'm facing a bug or if I'm missing something. In a
Processing script (or Processing plugin, same same) I cannot not get the
path of the folder when the folder is a Processing parameter:

...
NAME = 'NAME'
FOLDER = 'FOLDER'
...
self.addParameter(QgsProcessingParameterString(
        self.NAME,
        self.tr('My name')))

self.addParameter(QgsProcessingParameterFolderDestination(
        self.FOLDER,
        self.tr('Output folder')))
...
baseName = self.parameterAsString(parameters, self.NAME, context)
directory = self.parameterAsString(parameters, self.FOLDER, context)
basePath = os.path.join(directory, baseName)
feedback.pushDebugInfo(basePath)
return {self.FOLDER: basePath}


I always get a temporary path even when the user choose a folder on the
computer.

Someone else faced this problem?

Thanks for any suggestion!

Matteo
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to