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

Now I am getting:

  arc> (defop hello req (pr "hello world"))
  #<procedure:gs1665>
  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 ===
   srvlog
   gs1086
   handle-request-thread
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.
  nil
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 5895 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 5895 days ago | link

Whatever, just so long as it works :)

-----