diff options
author | Carl Worth <cworth@cworth.org> | 2010-01-05 13:29:23 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-01-06 10:32:06 -0800 |
commit | d807e28f43579ecc91aa40ae3e42760991c2f810 (patch) | |
tree | 7652db1538464607171efee2fdcf400b29bd02ec /notmuch-new.c | |
parent | ba07fe1819b59c9ecf7041834699d8959a604828 (diff) |
lib: Implement new notmuch_directory_t API.
This new directory ojbect provides all the infrastructure needed to
detect when files or directories are deleted or renamed. There's still
code needed on top of this (within "notmuch new") to actually do that
detection.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r-- | notmuch-new.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/notmuch-new.c b/notmuch-new.c index 2a929c56..ee6f196e 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -143,10 +143,13 @@ add_files_recursive (notmuch_database_t *notmuch, notmuch_message_t *message = NULL; struct dirent **namelist = NULL; int num_entries; + notmuch_directory_t *directory; path_mtime = st->st_mtime; - path_dbtime = notmuch_database_get_directory_mtime (notmuch, path); + directory = notmuch_database_get_directory (notmuch, path); + path_dbtime = notmuch_directory_get_mtime (directory); + num_entries = scandir (path, &namelist, 0, ino_cmp); if (num_entries == -1) { @@ -277,7 +280,7 @@ add_files_recursive (notmuch_database_t *notmuch, next = NULL; } - status = notmuch_database_set_directory_mtime (notmuch, path, path_mtime); + status = notmuch_directory_set_mtime (directory, path_mtime); if (status && ret == NOTMUCH_STATUS_SUCCESS) ret = status; |