Hello!

> I am using Chicken to make a browser utility with GUI in Windows XP.
> And I found that (file-copy) does not work correctly on Windows platform.
> file was copied quietly, but it seems broken.
> I looked into the source, and found it:
> 
> windows-mingw32-x86 [ manyargs dload ptables ]
> compiled 2011/08/14 on DESKTOP (MinGW)
> 
> #;3> (string-length (read-string #f (open-input-file "firefox.png")))
> 6162
> #;22> (file-size "firefox.png")
> 70516

Please try 

  (open-input-file "firefox.png" #:binary)

Windows distinguishes between binary and text files. On UNIX this flag
makes no difference.

> 
> It is necessary to fix (make-pathname) and (regular-file?), too.
> ;files.scm line176->(let ([def-pds (if ##sys#windows-platform "\\" "/")] )
> (define (regular-file?* src)
> (or (eq? (software-type) 'windows) (regular-file? src)))

I'm not sure what you mean: does "regular-file?" not work on Windows?
(I can't try it out myself, right now)

What chicken version are you using? "make-pathname" should normally
work.

> 
> I like Chicken Scheme, thank you for your great work!

You are very welcome. Thanks for using it!


cheers,
felix

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to