diff options
author | Gianluca Guida <glguida@gmail.com> | 2005-05-30 12:53:20 +0000 |
---|---|---|
committer | Gianluca Guida <glguida@gmail.com> | 2005-05-30 12:53:20 +0000 |
commit | 5030481050eeccb65643d849d6fb06d005f47c93 (patch) | |
tree | d77f7eae45bbc6029ab46287fa7fc35ef261654d /lib.c | |
parent | 60e5cc0a61638f9ffd9be22f3fbecc66ae174e03 (diff) |
New README and bugfixes.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -185,18 +185,22 @@ for_each_subdir (char *path, error_t (*func) (char *, char *)) err = stat (name, &filestat); - if (err) - return err; - free (name); + if (err) + { + fprintf (stderr, "unionfs: couldn't stat %s%s\n", + path, (*dirent)->d_name); + continue; + } + if (!S_ISDIR(filestat.st_mode)) continue; - err = func ((*dirent)->d_name, path); + func ((*dirent)->d_name, path); } - return err; + return 0; } error_t @@ -228,18 +232,22 @@ for_each_subdir_priv (char *path, error_t (*func) (char *, char *, void *), err = stat (name, &filestat); - if (err) - return err; - free (name); + if (err) + { + fprintf (stderr, "unionfs: couldn't stat %s%s\n", + path, (*dirent)->d_name); + continue; + } + if (!S_ISDIR(filestat.st_mode)) continue; func ((*dirent)->d_name, path, priv); } - return err; + return 0; } error_t |