From 3e0f49b846924a54df9115c038cf0a559a567db2 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 15 Jan 2008 09:24:50 +0000 Subject: rc_newer_than no longer tests if souce has data, making it a more logical function. As such, we add the existss function to check for existance and size when checking to see if the deptree needs an update. --- src/includes/rc-misc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/includes/rc-misc.h') diff --git a/src/includes/rc-misc.h b/src/includes/rc-misc.h index 68ebc80..ff32df9 100644 --- a/src/includes/rc-misc.h +++ b/src/includes/rc-misc.h @@ -111,6 +111,12 @@ static inline bool exists (const char *pathname) return (stat (pathname, &buf) == 0); } +static inline bool existss (const char *pathname) +{ + struct stat buf; + + return (stat (pathname, &buf) == 0 && buf.st_size != 0); +} char *rc_conf_value (const char *var); bool rc_conf_yesno (const char *var); char **env_filter (void); -- cgit v1.2.3