From e8225e0812ee8e44a256d89ebf465f265666f5fb Mon Sep 17 00:00:00 2001 From: wbaumann Date: Thu, 21 May 2009 08:27:49 +0000 Subject: [PATCH] Rename move_dirty to move_no_remote. --- ChangeLog | 4 +++- src/cache.c | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 504b0a0..00755d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,10 @@ ChangeLog for davfs2 -------------------- 2009-05-21 Werner Baumann (werner.baumann@onlinehome.de) - * cache.ce, move_dirty, move_reg: + * cache.c, move_dirty, move_reg: Use converted file name for dst_path. + * cache.c: + Rename move_dirty to Move_no_remote. 2009-05-15 Werner Baumann (werner.baumann@onlinehome.de) * cache.c, dav_close: diff --git a/src/cache.c b/src/cache.c index 0afc994..cc0f231 100644 --- a/src/cache.c +++ b/src/cache.c @@ -273,8 +273,8 @@ move_dir(dav_node *src, dav_node *dst, dav_node *dst_parent, const char *dst_name); static int -move_dirty(dav_node *src, dav_node *dst, dav_node *dst_parent, - const char *dst_name); +move_no_remote(dav_node *src, dav_node *dst, dav_node *dst_parent, + const char *dst_name); static int move_reg(dav_node *src, dav_node *dst, dav_node *dst_parent, @@ -1253,7 +1253,7 @@ dav_rename(dav_node *src_parent, const char *src_name, dav_node *dst_parent, ret = move_dir(src, dst, dst_parent, dst_name); } else { if (is_created(src) || is_backup(src)) { - ret = move_dirty(src, dst, dst_parent, dst_name); + ret = move_no_remote(src, dst, dst_parent, dst_name); } else { ret = move_reg(src, dst, dst_parent, dst_name); } @@ -1827,12 +1827,15 @@ move_dir(dav_node *src, dav_node *dst, dav_node *dst_parent, } -/* As the most recent version of file src is local, it deletes src and dst - on the server and locks dst. - CLEAN-UP-NEEDED: no longer used with dirty files. Remote must not exist. */ +/* src does not exist on the server, but there may be a locked null-resource. + - if dst exists it will be removed, local and remote + - if src is locked, it is unlocked + - the path of src is changed according dst_name + - dst is locked on the server + - src is moved to its new position in the tree. */ static int -move_dirty(dav_node *src, dav_node *dst, dav_node *dst_parent, - const char *dst_name) +move_no_remote(dav_node *src, dav_node *dst, dav_node *dst_parent, + const char *dst_name) { if (dst && is_dir(dst)) return EISDIR;