]> Kevux Git Server - fll/commit
Bugfix: Directory recursion is losing the error state. development
authorKevin Day <Kevin@kevux.org>
Tue, 3 Jun 2025 03:49:25 +0000 (22:49 -0500)
committerKevin Day <Kevin@kevux.org>
Tue, 3 Jun 2025 03:49:25 +0000 (22:49 -0500)
commit5137f3b59c7b36b7007b2fab4a9ff64b844f0db9
treee4ab3c6b0f69fab13213b6b3782558a7232356b6
parent9dec2e6a7b5f62bc3cb66f0ed6ef2c41fbccf9dc
Bugfix: Directory recursion is losing the error state.

The stream is being closed at the end of the directory recursion regardless of the error state.
This ends up overwriting the status code.

Preserve the status code before closing the stream.
Process the stream close.
Then restore the original status if the original status has an error or if the stream close worked.
level_1/fl_directory/c/private-directory.c