mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
Update s3fs_util.cpp
This commit is contained in:
parent
ac99df5c09
commit
230991782b
@ -724,6 +724,11 @@ mode_t get_mode(headers_t& meta, const char* path, bool checkdir, bool forcedir)
|
|||||||
}else{
|
}else{
|
||||||
if(meta.end() != (iter = meta.find("Content-Type"))){
|
if(meta.end() != (iter = meta.find("Content-Type"))){
|
||||||
string strConType = (*iter).second;
|
string strConType = (*iter).second;
|
||||||
|
// Leave just the mime type, remove any optional parameters (eg charset)
|
||||||
|
string::size_type pos = strConType.find(";");
|
||||||
|
if(string::npos != pos){
|
||||||
|
strConType = strConType.substr(0, pos);
|
||||||
|
}
|
||||||
if(strConType == "application/x-directory"){
|
if(strConType == "application/x-directory"){
|
||||||
mode |= S_IFDIR;
|
mode |= S_IFDIR;
|
||||||
}else if(path && 0 < strlen(path) && '/' == path[strlen(path) - 1]){
|
}else if(path && 0 < strlen(path) && '/' == path[strlen(path) - 1]){
|
||||||
|
Loading…
Reference in New Issue
Block a user