Temporary directory path is trimmed
Description
Currently, when obtaining the default temporary directory Khiops trims systematically the last character. For example if the temporary dir is /tmp then it is trimmed as /tm
Questions/Ideas
- The trim should happen only when the last character is the path separator of the system.
- To reproduce in Linux/macOS:
export TMPDIR=/tmpand then execute a khiops task. - Tangentially: I think that when Khiops does not find the system's temporary directory it should be a fatal.
Le répertoire temporaire système peut ne pas exister, ou ne pas permettre la création de fichiers temporaire (répertoire sur un disque plein, répertoire en read-only...). Ces types de problème sont en fait les mêmes que pour un répertoire temporaire spécifié par l'utilisateur. Ils peuvent même se produire au milieu d'un traitement en cours. Il faut bien tester tous les cas limites pour éviter les bugs "plantatif", et sortir proprement avec une erreur utilisateur claire, si possible en évitant les erreurs fatales.
Unable to reproduce this on Linux. Perhaps it is a macOS only bug. In that case, this commit 615fdf142ccd6023e586b1353a46234070d6a3dd is probably the source of the problem.
Unable to reproduce this on Linux. Perhaps it is a macOS only bug. In that case, this commit 615fdf1 is probably the source of the problem.
So maybe it suffices to change the assert to if ?
yes I think so
Could you make the patch? I can test it.
Merged to dev-v10 in #314, open until merging to dev
Merged to dev in #315