On Mon, Dec 09, 2024 at 07:47:54PM +0100, Grégory Vanuxem wrote:
> Hello,
>
> Thinking about that, and since the TMP or TEMP environment variables
> in Linux contrary to Windows don't exist by default apparently, what
> about creating the temporary files in src/input like some other
> temporary files.
<snip>
> I just checked with just Git cloned FriCAS on MSYS2/MINGW64, all
> files.input checks pass without the use of '/tmp/'.
There are to separate things that we can do:
- 'writable?' is essentially impossible to implement correctly
on modern systems. Namely, the only way to know that file
is writable is to write to it. When it works file is (or
rather was at time of write) writable. So I think that we
should not use 'writable?' for opening files.
- from what you wrote it seems that actial problem is that
'/tmp'/ is not writable from FriCAS. This can be fixed
by creating files in build directory.
I am not sure what you tried, but the attached patch works for
me on Linux and should fix problem on Windows.
--
Waldek Hebisch