[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] file-copy does not work on Windows
From: |
pippejp |
Subject: |
Re: [Chicken-users] file-copy does not work on Windows |
Date: |
Mon, 29 Aug 2011 14:59:51 +0900 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
Hi, Felix
I'm using "4.7.0" from
http://code.call-cc.org/releases/4.7.0/chicken-4.7.0.tar.gz
> Please try
>
> (open-input-file "firefox.png" #:binary)
>
> Windows distinguishes between binary and text files. On UNIX this flag
> makes no difference.
I did not notice it because my code worked on Ubuntu!
I added #:binary to my code. but "file-copy" still does not work correctly.
#;5> (file-copy "firefox.png" "Copy of Fx.png")
6162
#;6> (file-size "Copy of Fx.png")
6190
#;5> (file-copy "firefox.png" "Copy of Fx.png" #:binary)
6162
In "file-copy" definition at files.scm, #:binary is not used.
> 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.
regular-file? always return #f.
#;10> (regular-file? "Copy of Fx.png")
#f
make-pathname uses '/' instead of '\'
#;9> (make-pathname "C:\\foo\\bar" "testtest")
"C:\\foo\\bar/testtest"
By the way, I am using your egg 'qt-light'. It was nice but not enough,
so I added some features.
I attach the files.
Thanks,
satosi
qt-light-orig.zip
Description: Zip compressed data