From b08548f276f2b6adaa6961ad267682b0dce8e7e0 Mon Sep 17 00:00:00 2001 From: Matthew Walker Date: Wed, 10 Aug 2022 19:03:52 +1000 Subject: [PATCH] Escape double quotes in csv format --- catcli/noder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catcli/noder.py b/catcli/noder.py index 9b99d76..7d0d112 100644 --- a/catcli/noder.py +++ b/catcli/noder.py @@ -310,12 +310,12 @@ class Noder: out.append(node.attr) # meta else: # handle other nodes - out.append(node.name) # name + out.append(node.name.replace('"', '""')) # name out.append(node.type) # type parents = self._get_parents(node) storage = self._get_storage(node) fullpath = os.path.join(storage.name, parents) - out.append(fullpath) # full path + out.append(fullpath.replace('"', '""')) # full path out.append(utils.human(node.size)) # size out.append(utils.epoch_to_str(storage.ts)) # indexed_at