summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-05-05 15:58:03 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-05-05 17:14:45 +0530
commitd1e74d7faa8670d6a7bf47ab9105af03d7dcf9a6 (patch)
tree2337eec4ae906b7ec2bfc9cebe5ac26cc056f1eb /libglusterfsclient
parent5cfa7a3a5ee9199399137e217597b1b97f7a4e38 (diff)
libglusterfsclient: Dont lookup oldpath on symlink
The target of the symlink does not have to be interpreted in any way. It should be sent across as it is. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 36e7b4b0597..b0b226e99ab 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5439,20 +5439,8 @@ glusterfs_glh_symlink (glusterfs_handle_t handle, const char *oldpath,
GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, ctx, out);
GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO (LIBGF_XL_NAME, newpath, out);
+ /* Old path does not need to be interpreted or looked up */
oldloc.path = strdup (oldpath);
- op_ret = libgf_client_path_lookup (&oldloc, ctx, 1);
- if (op_ret == -1) {
- errno = ENOENT;
- goto out;
- }
-
- oldname = strdup (oldpath);
- op_ret = libgf_client_loc_fill (&oldloc, ctx, 0, oldloc.parent->ino,
- basename (oldname));
- if (op_ret == -1) {
- errno = EINVAL;
- goto out;
- }
newloc.path = strdup (newpath);
op_ret = libgf_client_path_lookup (&newloc, ctx, 1);