north-road / qgis-processing-saga-nextgen

GNU General Public License v3.0
22 stars 13 forks source link

Fix bug when there is a special character on the path to the batch file #27

Closed ismailsunni closed 1 year ago

ismailsunni commented 1 year ago

This PR fixes the bug when the batch file to run the SAGA command has a special character (fix #26). The reference to the special character: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cmd#remarks

There are two situations that this can happen:

  1. User creates a profile with a special character, e.g. new(profile)
  2. There is already a special character on the QGIS profile directory's path, e.g. D:\\Users\Company\UserName\AppData(Roaming)\QGIS\QGIS3\profiles\default\processing

This PR fixes a real-world issue (situation 2 above). We can reproduce it by creating a profile with a special character (situation 1).

nyalldawson commented 1 year ago

Thanks @ismailsunni ! Any chance of some tests for this?

ismailsunni commented 1 year ago

hi @nyalldawson I have added a minimal unit test for the function that I added. Let me know if it's enough or not.

Could you also approve the workflow to run, so that I can check if my test is fine in the CI?

Thanks!