khiops icon indicating copy to clipboard operation
khiops copied to clipboard

Temporary directory path is trimmed

Open folmos-at-orange opened this issue 1 year ago • 1 comments

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=/tmp and then execute a khiops task.
  • Tangentially: I think that when Khiops does not find the system's temporary directory it should be a fatal.

folmos-at-orange avatar Apr 17 '24 13:04 folmos-at-orange

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.

marcboulle avatar May 02 '24 09:05 marcboulle

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.

bruno-at-orange avatar May 27 '24 16:05 bruno-at-orange

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 ?

folmos-at-orange avatar Jun 05 '24 16:06 folmos-at-orange

yes I think so

bruno-at-orange avatar Jun 06 '24 07:06 bruno-at-orange

Could you make the patch? I can test it.

folmos-at-orange avatar Jun 07 '24 07:06 folmos-at-orange

Merged to dev-v10 in #314, open until merging to dev

folmos-at-orange avatar Jun 25 '24 06:06 folmos-at-orange

Merged to dev in #315

folmos-at-orange avatar Jun 25 '24 07:06 folmos-at-orange