From 61351de196652198485731809fa8537017f4ef5f Mon Sep 17 00:00:00 2001 From: wbaumann Date: Fri, 15 May 2009 18:57:01 +0000 Subject: [PATCH] Always delete directory cache files on close --- ChangeLog | 2 ++ src/cache.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a98374f..6fb63e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ ChangeLog for davfs2 -------------------- 2009-05-15 Werner Baumann (werner.baumann@onlinehome.de) + * cache.c, dav_close: + Always delete directory cache files on close. * cache.c, dav_open: Open dirs with O_RDONLY. * dav_coda.c, dav_fuse.c: diff --git a/src/cache.c b/src/cache.c index fc6d674..05c5a8d 100644 --- a/src/cache.c +++ b/src/cache.c @@ -805,11 +805,13 @@ dav_close(dav_node *node, int fd, int flags, pid_t pid, pid_t pgid) if (is_dir(node)) { node->atime = time(NULL); - } else { - attr_from_cache_file(node); - set_upload_time(node); + delete_cache_file(node); + return 0; } + attr_from_cache_file(node); + set_upload_time(node); + if (delay_upload == 0 && (is_dirty(node) || is_created(node)) && !is_open_write(node) && !is_backup(node)) { int set_execute = -1;