summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/file.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
index 3a3f5bb6..bce2b613 100644
--- a/src/libcamera/file.cpp
+++ b/src/libcamera/file.cpp
@@ -458,7 +458,8 @@ bool File::exists(const std::string &name)
if (ret < 0)
return false;
- return true;
+ /* Directories can not be handled here, even if they exist. */
+ return !S_ISDIR(st.st_mode);
}
} /* namespace libcamera */