more small fnmatch() fixes
This commit is contained in:
parent
dd0e89e694
commit
3736c00a3b
@ -21,7 +21,6 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <cstring>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -18,8 +18,6 @@
|
||||
|
||||
#include "autoconfig.h"
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@ -540,7 +540,7 @@ vector<string> ConfSimple::getNames(const string &sk, const char *pattern) const
|
||||
mylist.reserve(ss->second.size());
|
||||
map<string, string>::const_iterator it;
|
||||
for (it = ss->second.begin(); it != ss->second.end(); it++) {
|
||||
if (pattern && FNM_NOMATCH == fnmatch(pattern, it->first.c_str(), 0))
|
||||
if (pattern && 0 != fnmatch(pattern, it->first.c_str(), 0))
|
||||
continue;
|
||||
mylist.push_back(it->first);
|
||||
}
|
||||
|
||||
@ -74,6 +74,12 @@ video/x-msvideo = exec rclnull
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>Wildcards expressions sometimes cause false matches
|
||||
because of issues in handling errors from fnmatch(). This
|
||||
will only occur in an UTF-8 locale where file name
|
||||
conversion errors are possible (for old 8bit file
|
||||
names).</li>
|
||||
|
||||
<li>On systems such as Debian Stable which use Evince version
|
||||
2.x (not 3.x) as PDF viewer, the default "Open" command for
|
||||
PDF files will not work. You need to edit the command:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user