dir(): Do not assert(), return -1 and errno

The dir() function, although useless compared to glob(), called assert()
and perror() instead of returning an error code.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-06-06 17:56:13 +02:00
1 parent 92d81280a9
commit 1d698418c7
2 files changed
+15 -9

No files matched your search

+2 -1
View File
@@ -155,7 +155,8 @@ Generic Functions
Wrapper for `scandir()` with optional filter. Returns a list of
names: files and directories that must be freed after use. See
the unit test at the bottom for an example.
the unit test for an example, or take a look at `glob(3)`, it's
probably what you want anyway.
- `fcopyfile(src, dst)`