CNES / MAJA

Level-2A processor used for atmospheric correction and cloud-detection. The active repository is the one below, this one is kept to leave access to the older issues.
https://gitlab.orfeo-toolbox.org/maja/maja
Apache License 2.0
139 stars 25 forks source link

[BUG] Escape the square brackets in glob.glob. #16

Closed Julien-Osman closed 5 years ago

Julien-Osman commented 5 years ago

When the path to one of the input directory contains square brackets ('[' or ']'), the glob.glob function may return erroneous values. Indeed, those characters are interpreted by glob.glob. To fix this, one needs to escape the square brackets. Escaping only the opening square bracket is sufficient

To escape a character in glob.glob, one needs to wrap it with square brackets. So '[' becomes '[[]'. To to so, I used the replace method : repGipp.replace('[', '[[]')