mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-05 12:27:53 +00:00
compare mime types w/strcasecmp
git-svn-id: http://s3fs.googlecode.com/svn/trunk@166 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
66887436b5
commit
a2d7ad4225
@ -44,6 +44,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <strings.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -859,7 +860,13 @@ s3fs_readlink(const char *path, char *buf, size_t size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef map<string, string> mimes_t;
|
||||
struct case_insensitive_compare_func {
|
||||
bool operator ()(const string &a, const string &b) {
|
||||
return strcasecmp(a.c_str(), b.c_str()) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
typedef map<string, string, case_insensitive_compare_func> mimes_t;
|
||||
|
||||
static mimes_t mimeTypes;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user