Hi Dimitris, Thanks for the feedback.
On 04 Dec 2015, at 08:01, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
I am on Yosemite, latest 5 image, lastest VM and using this code
ZnClient new url: 'https://github.com/kilon/ChronosManager/archive/master.zip'; setIfModifiedSince: (Date year: 2015 month: 12 day: 1); downloadTo: FileLocator imageDirectory.
it downloads the file but does not append the extension ".zip" as it should.
Hmm, that is tricky. If you inspect ZnLogEvent announcer during the execution you will notice that a redirect is involved. Your original request for https://github.com/kilon/ChronosManager/archive/master.zip gets redirected to a request for https://codeload.github.com/kilon/ChronosManager/zip/master for which the name is effectively 'master' without the extension. Maybe the original name should be used, I have to think a bit about that. It seems that curl does it like that. In any case, you can also specify a file to #downloadTo: as a workaround. Try: ZnClient new url: 'https://github.com/kilon/ChronosManager/archive/master.zip'; setIfModifiedSince: (Date year: 2015 month: 12 day: 1); downloadTo: FileLocator imageDirectory / 'master.zip'; yourself.
Unfortunately setIfModifiedSince: does not seem to be supported by Github :(
Yeah, not much you can do about that. Sven