From b4eb53db7b9074b114e2c7327b412940ca9e26c0 Mon Sep 17 00:00:00 2001
From: Milind Changire <mchangir@redhat.com>
Date: Fri, 30 Jun 2017 13:33:46 +0530
Subject: [PATCH 539/539] tools/glusterfind: unquote DELETE path before further
processing
Problem:
DELETE path is quoted before it reaches glusterfind. This wasn't handled
in the glusterfind code leading to double quoting of path separator
'%2F' to '%252F' i.e. the '%' character in '%2F' itself was quoted to
'%25'
Solution:
unquote the the deleted path before further processing
mainline:
> BUG: 1465024
> Reviewed-on: https://review.gluster.org/17629
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit d95535bae2d200c2210feac7568b1fdbf6f545a9)
Change-Id: I2dfbbd7792dc0f9da5c8e02093b0f1c031ff344a
BUG: 1465011
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/110578
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
tools/glusterfind/src/changelogdata.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/glusterfind/src/changelogdata.py b/tools/glusterfind/src/changelogdata.py
index 0e32d7b..b4a9709 100644
--- a/tools/glusterfind/src/changelogdata.py
+++ b/tools/glusterfind/src/changelogdata.py
@@ -16,6 +16,7 @@ import os
from utils import RecordType
from utils import output_path_prepare
+
class OutputMerger(object):
"""
Class to merge the output files collected from
@@ -421,8 +422,8 @@ class ChangelogData(object):
deleted_path = data[4] if len(data) == 5 else ""
if deleted_path != "":
- deleted_path = output_path_prepare(deleted_path,
- self.args)
+ deleted_path = urllib.unquote_plus(deleted_path.encode("utf-8"))
+ deleted_path = output_path_prepare(deleted_path, self.args)
if self.gfidpath_exists({"gfid": data[1], "type": "NEW",
"pgfid1": pgfid1, "bn1": bn1}):
--
1.8.3.1