karelia / ConnectionKit

FTP/SFTP/WebDAV etc. for Cocoa. Join the ConnectionKit mailing list for information and suggestions.
http://lists.opensource.utr-software.com/listinfo.cgi/connection-opensource.utr-software.com
493 stars 72 forks source link

Properly escape command to fix a bug preventing creation of folders with a space in the name #83

Closed vincent-le-normand closed 9 years ago

vincent-le-normand commented 9 years ago

Properly escape command to fix a bug preventing creation of folders with a space in the name

mikeabdullah commented 9 years ago

Well I see what you mean by this bug! Trouble is, it begs the question: what to do if the filename contains a quote mark?

mikeabdullah commented 9 years ago

I think I've gotten a grip on the rules libcurl needs:

  1. Quote the overall path in case it contains spaces
  2. \" for a quote as part of a path
  3. \\ for a backslash as part of a path
mikeabdullah commented 9 years ago

Merged, thanks!