Replace non standard FNM_FILE_NAME with POSIX FNM_PATHNAME.
This commit is contained in:
parent
89bd156918
commit
16cfaf9059
@ -484,7 +484,7 @@ int check_excludes(IsoImage *image, const char *path)
|
|||||||
char *exclude = image->excludes[i];
|
char *exclude = image->excludes[i];
|
||||||
if (exclude[0] == '/') {
|
if (exclude[0] == '/') {
|
||||||
/* absolute exclude, must completely match path */
|
/* absolute exclude, must completely match path */
|
||||||
if (!fnmatch(exclude, path, FNM_PERIOD|FNM_FILE_NAME)) {
|
if (!fnmatch(exclude, path, FNM_PERIOD|FNM_PATHNAME)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -492,7 +492,7 @@ int check_excludes(IsoImage *image, const char *path)
|
|||||||
char *pos = (char*)path;
|
char *pos = (char*)path;
|
||||||
while (pos != NULL) {
|
while (pos != NULL) {
|
||||||
pos++;
|
pos++;
|
||||||
if (!fnmatch(exclude, pos, FNM_PERIOD|FNM_FILE_NAME)) {
|
if (!fnmatch(exclude, pos, FNM_PERIOD|FNM_PATHNAME)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
pos = strchr(pos, '/');
|
pos = strchr(pos, '/');
|
||||||
|
Loading…
Reference in New Issue
Block a user