util/disk_cache: correctly use stat(3)
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 11 Feb 2017 11:32:47 +0000 (22:32 +1100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 13 Feb 2017 10:01:12 +0000 (10:01 +0000)
commit0cbde643eb29c8bf19eb8551ac8e821f7f733212
treeff92b236cebd2654d4bb232a38d20419afd21e5b
parent0f53404565b9ef9da9d7022b5732463acd496742
util/disk_cache: correctly use stat(3)

I forgot to error check stat() and also I wasn't using the subdir in
is_two_character_sub_directory().

Fixes: d7b3707c612 "util/disk_cache: use stat() to check if entry is a directory"
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/util/disk_cache.c