cURL download error

This code is part of a script to download a zip file from an https link in a Mail message, and write it to a Snow Leopard Server folder. The code worked the last time I used it a few months ago, but now it doesn’t.
The “download” and “order_id” variables are text strings from the message content. The “download” string is an https link.


	try
		set destinationFolder to "/Volumes/CustomerFiles/UPLOADED_ORDER_FILES"
		do shell script "curl " & quoted form of download & " -o " & quoted form of (POSIX path of destinationFolder) & quoted form of order_id & ".zip"
	on error
		-- if error, download manually
		try
			tell application "Finder"
				activate
				display dialog "Oops! There was a download error. Please download by clicking the download link in the order email."
			end tell
		end try
	end try

Any ideas?

It’s quoted form of (destinationFolder & “/” & order_id & “.zip”) because:

  1. destinationFolder is alread a posix path so a coercion is not necessary
  2. & “/” is needed because destinationFolder does not end with a /
  3. Two quoted forms is something the CLI hates and can be interpreted wrong so remove it.