Merge pull request #885 from LutzFinsterle2019/master

Update s3fs_util.cpp for correspondence of Nextcloud contype
This commit is contained in:
Takeshi Nakatani 2019-01-20 15:32:58 +09:00 committed by GitHub
commit c83a3e67c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -826,7 +826,8 @@ mode_t get_mode(headers_t& meta, const char* path, bool checkdir, bool forcedir)
if(string::npos != pos){
strConType = strConType.substr(0, pos);
}
if(strConType == "application/x-directory"){
if(strConType == "application/x-directory"
|| strConType == "httpd/unix-directory"){ // Nextcloud uses this MIME type for directory objects when mounting bucket as external Storage
mode |= S_IFDIR;
}else if(path && 0 < strlen(path) && '/' == path[strlen(path) - 1]){
if(strConType == "binary/octet-stream" || strConType == "application/octet-stream"){