[libcamera-devel] [PATCH 0/2] libcamera: file: Don't parse directories
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Dec 22 14:58:47 CET 2020
During development, and checking that the file I needed existed, I hit a
fault where the path was inadvertantly pointing to a directory.
The call to File::exists() then succeeded, and the code attempted to
parse a directory as if it were a file, with expectedly undesireable
results.
Add a test to ensure that File::exists does not return true when given a
directory and fix the underlying issue.
Kieran Bingham (2):
test: file: Check that directories are not treated as files
libcamera: file: Check files exist()
src/libcamera/file.cpp | 3 ++-
test/file.cpp | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.25.1
More information about the libcamera-devel
mailing list