derrickchoi / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

0 byte files with same name as directories #94

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make an empty directory in the mounted bucket with mkdir
2. a new 0 byte file is created in the bucket to represent the empty directory 
(visible from various tools such as s3 browser)
3. copy a file into the empty directory using cp
4. a new key is created in the bucket with /directoryname/filename
5. the 0 byte file that represents the empty directory remains in the bucket

What is the expected output? What do you see instead?
The 0 byte files should be cleaned up when the directory is not empty

What version of the product are you using? On what operating system?
Cannot verify version, included with wowza media server ami's

Please provide any additional information below.
The 0 byte files wreak havoc with some s3 management tools because they have 
the same name as the directories. Most tools simply refuse to open the 
directories.

Original issue reported on code.google.com by joey9...@gmail.com on 11 Aug 2010 at 8:02

GoogleCodeExporter commented 8 years ago
This is another artifact of s3fs not being compatible with other S3 cockpits.

Original comment by dmoore4...@gmail.com on 19 Oct 2010 at 2:36

GoogleCodeExporter commented 8 years ago
I just had "s3cmd sync" delete the zero byte directory files rendering all of 
the directories invisible to my s3fs access...hmmm, what to do now???

Original comment by low...@digitalfarrier.com on 24 Sep 2011 at 5:38

GoogleCodeExporter commented 8 years ago
A little late but:

"S3FS-C supports folder objects created by AWS Management Console. AWS 
management Console's folder is a zero-byte object with key that ends with a 
slash, i.e. "folder_name/". S3FS however uses a different folder scheme: folder 
is a zero-byte object with it matadata Content-Type set to 
application/x-directory. "

From: https://github.com/tongwang/s3fs-c

Maybe try creating a 0 byte file, set the Content-Type to 
application/x-directory, and then see if you can get to that directory. If that 
works, write a script to create that file for all the directories.

Original comment by fle...@fletchowns.net on 15 Jan 2012 at 10:34