Arc Forumnew | comments | leaders | submitlogin
2 points by eds 4127 days ago | link | parent

Now I am getting:

  arc> (defop hello req (pr "hello world"))
  arc> (asv)
  The syntax of the command is incorrect.
  ready to serve port 8080
and upon going to http://localhost:8080/hello (which is still blank)

  open-output-file: cannot open output file: "C:\User\Programming\Arc\arc-wiki\arc
  /logs/srv-2008-02-26" (The system cannot find the path specified.; errno=3)
   === context ===
If I instead manually create a directory arc/logs before attempting (asv), everything works fine.

It looks like (asv) calls (serve port), which calls (ensure-dir logdir* ), which would seem to be our culprit

  arc> (ensure-dir logdir* )
  The syntax of the command is incorrect.
since ensure-dir calls directly out to mkdir and Windows breaks on the forward slashes in the command. Changing that part of the definition of ensure-dir from

  (system (string "mkdir -p " path))
to using the convenient definitions in files.arc

  (mkdir path)
should do the trick.

EDIT: Verified that the fix works with both (asv) and (nsv); pushed to Anarki. This should resolve web server problems on Windows.

2 points by nex3 4127 days ago | link

I was working on this, too, and I got rid of your commit and added mine (sorry!). There are some complications with just using make-directory - specifically, it doesn't create parents directories. We need make-directory* to do this, and that sets the sticky bit on directories in Unix. So my solution was to use system on Unix and make-directory*.


1 point by eds 4127 days ago | link

Whatever, just so long as it works :)