diff options
Diffstat (limited to 'firmware/common/file_internal.c')
-rw-r--r-- | firmware/common/file_internal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c index 75fb21e8a6..8fee802f6f 100644 --- a/firmware/common/file_internal.c +++ b/firmware/common/file_internal.c | |||
@@ -351,10 +351,10 @@ static int fill_path_compinfo(struct pathwalk *walkp, | |||
351 | compinfo->length = compp->length; | 351 | compinfo->length = compp->length; |
352 | compinfo->attr = compp->attr; | 352 | compinfo->attr = compp->attr; |
353 | compinfo->filesize = walkp->filesize; | 353 | compinfo->filesize = walkp->filesize; |
354 | if (!(walkp->callflags & FF_SELFINFO)) | 354 | if (walkp->callflags & FF_INFO) |
355 | compinfo->parentinfo = (compp->nextp ?: compp)->info; | ||
356 | else | ||
357 | compinfo->info = compp->info; | 355 | compinfo->info = compp->info; |
356 | if (walkp->callflags & FF_PARENTINFO) | ||
357 | compinfo->parentinfo = (compp->nextp ?: compp)->info; | ||
358 | } | 358 | } |
359 | 359 | ||
360 | return rc; | 360 | return rc; |
@@ -571,9 +571,9 @@ int open_stream_internal(const char *path, unsigned int callflags, | |||
571 | FILE_ERROR(path ? ENOENT : EFAULT, -1); | 571 | FILE_ERROR(path ? ENOENT : EFAULT, -1); |
572 | } | 572 | } |
573 | 573 | ||
574 | /* if !compinfo, then the result of this check is not visible anyway */ | 574 | /* if !compinfo then these cannot be returned anyway */ |
575 | if (!compinfo) | 575 | if (!compinfo) |
576 | callflags &= ~FF_CHECKPREFIX; | 576 | callflags &= ~(FF_INFO | FF_PARENTINFO | FF_CHECKPREFIX); |
577 | 577 | ||
578 | /* This lets it be passed quietly to directory scanning */ | 578 | /* This lets it be passed quietly to directory scanning */ |
579 | stream->flags = callflags & FF_MASK; | 579 | stream->flags = callflags & FF_MASK; |