From ef5c3182224940f76d9290c1c4d9cc8e78fbdb83 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 31 Mar 2015 13:47:21 +0200 Subject: features/trash: fix remove_trash_path in the internal case In the internal case, copy_trash_path adds a second path component "internal_op/", so remove_trash_path should remove it again. Originally, remove_trash_path did the same thing in the internal and non-internal case. This patch fixes this problem. Change-Id: If247d18217a2375d369672182f69a54881df26b9 BUG: 1207709 Signed-off-by: Michael Adam Reviewed-on: http://review.gluster.org/10073 Tested-by: Gluster Build System Reviewed-by: Anoop C S Reviewed-by: Vijay Bellur --- xlators/features/trash/src/trash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features') diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index c1d78602c4c..3a28815571e 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -126,7 +126,7 @@ remove_trash_path (const char *path, gf_boolean_t internal, char **rem_path) *rem_path = strchr (path + 1, '/'); if (internal) - *rem_path = strchr (path + 1, '/'); + *rem_path = strchr (*rem_path + 1, '/'); } /** -- cgit