om

om - the most recently modified file in a directory
git clone git://git.larryhynes.net/om
Log | Files | Refs | README | LICENSE

commit 326849d1f472a0b44750db21873fc7a67d8b88e6
parent 8eada13ccb20777730782aaa98e7622240f1b709
Author: Larry Hynes <larry@larryhynes.com>
Date:   Tue,  4 Jul 2017 20:48:49 +0100

Error out if we can't read dir

Diffstat:
om.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/om.c b/om.c @@ -54,7 +54,7 @@ om() dirp = opendir(dir); if (!dirp) - return; + errx(1, "Could not read %s", dir); while ((ent = readdir(dirp)) != NULL) { len = strlcpy(buf, dir, sizeof(buf));