From 35fc174ea3a37546d7c90be8fa6076b8f9416d73 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Mon, 11 May 2009 18:24:43 +0530 Subject: libglusterfsclient: Comply with EEXIST rule on rename During a rename, if the new file exists, the old name needs to over-write the new name. We're returning EEXIST, which is wrong behaviour. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 91f105776..7e8501644 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -5342,14 +5342,6 @@ glusterfs_glh_rename (glusterfs_handle_t handle, const char *oldpath, goto out; op_ret = libgf_client_path_lookup (&newloc, ctx, 1); - if (op_ret == 0) { - gf_log ("libglusterfsclient", GF_LOG_ERROR, - "newpath (%s) already exists, returning" - " EEXIST", newloc.path); - errno = EEXIST; - op_ret = -1; - goto out; - } oldname = strdup (oldloc.path); op_ret = libgf_client_loc_fill (&oldloc, ctx, 0, oldloc.parent->ino, -- cgit