diff options
author | Saravanakumar Arumugam <sarumuga@redhat.com> | 2015-07-17 15:51:22 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2015-08-26 23:21:23 -0700 |
commit | 0c47ef608b22ce719a0238c292cd8550986ad0cd (patch) | |
tree | 77f6ce8263d0e767300c16d13722038b361aa11c /tools/glusterfind/src/changelogdata.py | |
parent | a26dbb38acdb2ec5fe16068caee189709faae76e (diff) |
tools/glusterfind: Prepend prefix in case of delete
In case of delete operation alone, output prefix adding
was not handled earlier.
Output prefix is added now.
Change-Id: Ia91444dddbff501b26a864f6185ca4c0aaf4c802
BUG: 1244144
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: http://review.gluster.org/11712
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'tools/glusterfind/src/changelogdata.py')
-rw-r--r-- | tools/glusterfind/src/changelogdata.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/glusterfind/src/changelogdata.py b/tools/glusterfind/src/changelogdata.py index 08d711b9696..39a16d57cb5 100644 --- a/tools/glusterfind/src/changelogdata.py +++ b/tools/glusterfind/src/changelogdata.py @@ -13,7 +13,7 @@ import urllib import os from utils import RecordType - +from utils import output_path_prepare class OutputMerger(object): """ @@ -386,12 +386,16 @@ class ChangelogData(object): not self.gfidpath_exists({"gfid": data[1], "type": "MODIFY"}): self.gfidpath_add(changelogfile, RecordType.MODIFY, data[1]) - def when_unlink_rmdir(self, changelogfile, data): + def when_unlink_rmdir(self, changelogfile, data, args): # E <GFID> <UNLINK|RMDIR> <PGFID>/<BASENAME> pgfid1, bn1 = urllib.unquote_plus(data[3]).split("/", 1) # Quote again the basename bn1 = urllib.quote_plus(bn1.strip()) + deleted_path = data[4] if len(data) == 5 else "" + if deleted_path != "": + deleted_path = output_path_prepare(deleted_path, + args.output_prefix) if self.gfidpath_exists({"gfid": data[1], "type": "NEW", "pgfid1": pgfid1, "bn1": bn1}): |