Thanks for this tool, so far it is working well and it would have saved me a lot of time in the past if I hadn't been so focused on finding GUI tools. I'm using this under Windows if it matters.
Anyways, I have been needing to migrate over a terabyte of data out of S3 but the GUI tools I had been using in the past to put the data into S3 were failing me or were too cumbersome for this task. So I gave this a try and right away I had an issue with directories. It seems that one or more of the GUI tools had created placeholder files for directories in S3 and the script would first find this file then later encounter an error when it tried to create a directory under the same name.
E.g.:
bucket:2007
bucket:2007/blah.ext
s3sync would create the file 2007 then fail when it tried to create the 2007 directory.
So this is my patch which may help someone else so I thought I would share. So far it is working for me. I have no idea what broader implications this change may have.
Around line 322 in s3sync.rb right after:
debug("S3 item #{item.name}")
I changed this:
g.yield(S3Node.new(bucket, prefix, item))
to this:
if item.name == path and $S3syncOptions['--make-dirs']
debug("item found with path name #{path}, skipping due to --make-dirs")
else
g.yield(S3Node.new(bucket, prefix, item))
end