Hello again,

Moritz Heidkamp <mor...@twoticketsplease.de> writes:
> 1. It dumps compilation results in ~/.cache by default. This, however,
>    is a bit like dumping stuff in /usr/share so I think it would be
>    better to make this ~/.cache/chicken-inline or something.

Mario just pointed out to me in #chicken that the current default is
actually ".cache", not "~/.cache". It just happened to be that I ran csi
from my home when trying it out and then I didn't properly read the code
when hacking up the patch. Considering that this default directory is
apparently meant as a relative path I propose the attached new version
which sets it to ".chicken-inline" by default.

Moritz
Index: inline.scm
===================================================================
--- inline.scm  (revision 28291)
+++ inline.scm  (working copy)
@@ -39,7 +39,7 @@
 (define (inline-eval x . o)
   (inline-compile x (if (pair? o) (car o) "") #t))
 
-(define-constant default-inline-cache-name ".cache")
+(define-constant default-inline-cache-name ".chicken-inline")
 
 (define windows-shell (foreign-value "C_WINDOWS_SHELL" bool))
 (define inline-cache (make-parameter default-inline-cache-name))
@@ -94,7 +94,6 @@
           (zero? (system (sprintf "cmp -s ~A ~A" (qs a) (qs b)))) )))
 
 (define (ensure-cache)
-  (unless (file-exists? (inline-cache))
-    (create-directory (inline-cache)) ) )
+  (create-directory (inline-cache) #t) )
 
 )
_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to