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)
* 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:

View File

@ -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;