Always delete directory cache files on close

This commit is contained in:
wbaumann 2009-05-15 18:57:01 +00:00
parent 73c64ae8e0
commit 61351de196
2 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,8 @@ ChangeLog for davfs2
-------------------- --------------------


2009-05-15 Werner Baumann (werner.baumann@onlinehome.de) 2009-05-15 Werner Baumann (werner.baumann@onlinehome.de)
* cache.c, dav_close:
Always delete directory cache files on close.
* cache.c, dav_open: * cache.c, dav_open:
Open dirs with O_RDONLY. Open dirs with O_RDONLY.
* dav_coda.c, dav_fuse.c: * dav_coda.c, dav_fuse.c:

View File

@ -805,10 +805,12 @@ dav_close(dav_node *node, int fd, int flags, pid_t pid, pid_t pgid)


if (is_dir(node)) { if (is_dir(node)) {
node->atime = time(NULL); node->atime = time(NULL);
} else { delete_cache_file(node);
return 0;
}

attr_from_cache_file(node); attr_from_cache_file(node);
set_upload_time(node); set_upload_time(node);
}


if (delay_upload == 0 && (is_dirty(node) || is_created(node)) if (delay_upload == 0 && (is_dirty(node) || is_created(node))
&& !is_open_write(node) && !is_backup(node)) { && !is_open_write(node) && !is_backup(node)) {