summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-11 18:24:43 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-18 19:13:18 +0530
commit35fc174ea3a37546d7c90be8fa6076b8f9416d73 (patch)
tree8e391d5f94d9709cdb4470e60476d2f1d9f0e6ab /libglusterfsclient
parent95ce0a87f5fbb139f7002360d63a005bfb9c097d (diff)
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 <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c8
1 files changed, 0 insertions, 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,