diff options
-rw-r--r-- | devbot/sourcestamp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/devbot/sourcestamp.c b/devbot/sourcestamp.c index c5dffd6..e2b9663 100644 --- a/devbot/sourcestamp.c +++ b/devbot/sourcestamp.c @@ -35,10 +35,6 @@ list_dir(const char *dir, time_t *mtime, int *n_files) lstat(entry->d_name, &statbuf); - if (statbuf.st_mtime > *mtime) { - *mtime = statbuf.st_mtime; - } - if(S_ISDIR(statbuf.st_mode)) { if(strcmp(".", entry->d_name) == 0 || strcmp("..", entry->d_name) == 0 || @@ -47,6 +43,10 @@ list_dir(const char *dir, time_t *mtime, int *n_files) list_dir(entry->d_name, mtime, n_files); } + + if (statbuf.st_mtime > *mtime) { + *mtime = statbuf.st_mtime; + } } chdir(".."); |