Quick note: writable?("tt") from above returns true so the code is
correct from what I see (the code takes into account the working
directory).

Le dim. 8 déc. 2024 à 15:11, Grégory Vanuxem <g.vanu...@gmail.com> a écrit :
>
> Looking more carefully it seems this is caused by SBCL on Windows
> which uses a mixed Windows/Linux path scheme:
>
> (1) -> )lisp (truename "tt")
>
> Value = #P"C:/msys64/home/gregv/build/tt"
>
> Above it is just after a ')sys touch tt' in the build directory.
> Checking more deeper in cfuns-c.c, writeablep:
> In this piece of code:
>     code = stat(path, &buf);
>     if (code == -1) {
>         /** The file does not exist, so check to see
>                  if the directory is writable                  *****/
>         if (make_path_from_file(newpath, path) == -1 ||
>             stat(newpath, &buf) == -1) {
>             return (-1);
>         }
>     }
>
> the path-s can't indeed be stat-ed, the two returned values are -1. On
> my Windows 11 I haven't a C:\Tmp directory by default, see the
> attached file to see the errors returned (particularly the second
> 'open'):
>
> So just /tmp is not accessible by default on Windows 11 with SBCL even
> if I start FriCAS from MSYS2 (linux paths).
>
> Le dim. 8 déc. 2024 à 14:04, Waldek Hebisch <de...@fricas.org> a écrit :
> >
> > On Sun, Dec 08, 2024 at 12:46:53PM +0100, Grégory Vanuxem wrote:
> > > Hello Waldek,
> > >
> > > That compiles fine on WSL Linux and  MSYS2/Windows x86_64 but
> > > files.input does not pass checks on Windows because writeable? returns
> > > false even if I can 'touch' (and write in) a file in /tmp/.
> >
> > There are two 'open'-s for writing in 'files.input'.  Do both fail?
> > Or maybe only one?
> >
> > --
> >                               Waldek Hebisch
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "FriCAS - computer algebra system" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to fricas-devel+unsubscr...@googlegroups.com.
> > To view this discussion visit 
> > https://groups.google.com/d/msgid/fricas-devel/Z1WZUUgmuasz-VYQ%40fricas.org.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dYYHzBmjvk6_tjpdGE4oAuYpQ7-7GPom-Yf%3Dwn8wr-%3DbA%40mail.gmail.com.

Reply via email to