mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-05 04:17:52 +00:00
Issue 10: fix bug wrt s3fox folders
git-svn-id: http://s3fs.googlecode.com/svn/trunk@37 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
56915cdf88
commit
59f95c7d57
@ -368,8 +368,9 @@ s3fs_getattr(const char *path, struct stat *stbuf) {
|
||||
if (curl_easy_getinfo(curl, CURLINFO_FILETIME, &LastModified) == 0)
|
||||
stbuf->st_mtime = LastModified;
|
||||
|
||||
char* ContentType;
|
||||
if (curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ContentType) == 0)
|
||||
char* ContentType = 0;
|
||||
stbuf->st_mode = S_IFREG|0755;
|
||||
if (curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ContentType) == 0 && ContentType)
|
||||
stbuf->st_mode = strcmp(ContentType, "application/x-directory")== 0 ? S_IFDIR | 0755 : S_IFREG | 0755;
|
||||
|
||||
double ContentLength;
|
||||
|
Loading…
Reference in New Issue
Block a user