S3Sync.net

General Category => Report Bugs => Topic started by: mhulse on April 27, 2010, 02:59:22 PM



Title: Dots in folder names... Bug?
Post by: mhulse on April 27, 2010, 02:59:22 PM
Just curious... Has anyone else experienced any problems with dots in folder names?

I have two folders:

/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete --verbose /sync/this/folder/v3/ my-bucket:v3
#/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete --verbose /sync/this/folder/v3.5/ my-bucket:v3.5

In the above code, I ran s3sync, and (from what I can tell) the "v3" content deleted the content from my "v3.5" bucket!

Any tips? Should I be quoting my paths?

Thanks!
M


Title: Re: Dots in folder names... Bug?
Post by: Admin on April 28, 2010, 12:12:55 PM
Interesting.  Please attach -d -v log


Title: Re: Dots in folder names... Bug?
Post by: mhulse on April 28, 2010, 12:26:57 PM
Thanks! I will try to get that tested by EOD. I will setup a sandbox. :)

Thanks!
Micky


Title: Re: Dots in folder names... Bug?
Post by: mhulse on April 28, 2010, 01:50:57 PM
Hi,

I duplicated the v3 and v3.5 folders/nodes (with all the same contents) on my local server, and then I used s3Sync to upload them to my S3 bucket:

/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5/ my-bucket:v5
/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5.5/ my-bucket:v5.5

This successfully uploaded the content to my-bucket on S3.

I then commented-out the second line, and ran the script again:

/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5/ my-bucket:v5
#/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5.5/ my-bucket:v5.5

The contents of my v5.5 folder/node were deleted, and the v5 folder/node was successfully updated.

I will PM you the log.

Thanks so much for you help! I really appreciate it. :)

Cheers,
Micky


Title: Re: Dots in folder names... Bug?
Post by: ferrix on April 29, 2010, 08:44:05 AM
You can PM it to me. (I don't think the admin account can get PMs) 


Title: Re: Dots in folder names... Bug?
Post by: ferrix on April 29, 2010, 02:27:15 PM
Aha, I should have seen this from your command line.

I'm doing this from memory here, but:
When you don't end the S3 path in a slash, anything that starts with that "prefix" gets seen as a subdirectory.  I think this could be classified as a bug in the client code, since I don't think anyone ever intends that usage.  It's an artifact of how S3 does list operations.  Try trailing the s3 path with a slash?


Title: Re: Dots in folder names... Bug?
Post by: mhulse on April 29, 2010, 03:07:48 PM
Hi Ferrix! Thanks so much for all of your help. I really appreciate it. :)

I added slashes to the ends of my nodes (see below), but this time it deleted the v5.5 node! I dunno, maybe I am doing it wrong. :(

Details:

/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5/ my-bucket:v5/
#/path/to/ruby /path/to/s3cmd/s3sync.rb -r -p --delete -d -v /sync/this/folder/v5.5/ my-bucket:v5.5/

I wonder if we are running an older version of the s3Sync code?

I will send you new log files. :)

Thanks again!!!!

Cheers,
Micky


Title: Re: Dots in folder names... Bug?
Post by: ferrix on April 30, 2010, 11:17:23 AM
It could be a bug still.  I have been going by memory and not actually testing. 

I have been trying to get time to make a new s3sync that will be more easily extended and have less limitations.  One down side to having this plan is that making changes and fixes to the old code seems a waste of time, and I've been neglecting it.


Title: Re: Dots in folder names... Bug?
Post by: mhulse on April 30, 2010, 11:21:58 AM
Oh, for sure. I completely understand.

I have no complaints at all. I may still be doing something wrong and/or I could just not sync the folders with dots in their names... Anyway/after all, the code is 100% free!

Thanks so much for you help!

Have a great day. :)

Cheers,
Micky