fileargs: fix double caching of the same file
In situations when the current file name wasn't the first element on the list we were cleaning the current name too early. This might cause us to pre-cache the same file twice.
This commit is contained in:
parent
5a8d32b53b
commit
2b1d0c0087
@ -562,8 +562,12 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *limits,
|
||||
break;
|
||||
}
|
||||
|
||||
if (type != NV_TYPE_NULL || (current_name != NULL &&
|
||||
strcmp(fname, current_name) == 0)) {
|
||||
if (type != NV_TYPE_NULL) {
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if (current_name != NULL &&
|
||||
strcmp(fname, current_name) == 0) {
|
||||
current_name = NULL;
|
||||
i--;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user