diff options
-rw-r--r-- | sos/plugins/__init__.py | 10 | ||||
-rw-r--r-- | sos/sosreport.py | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 862f34ff..42a85aea 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -661,7 +661,8 @@ class Plugin(object): if len(self.copiedFiles): html = html + "<p>Files copied:<br><ul>\n" for afile in self.copiedFiles: - html = html + '<li><a href="%s">%s</a>' % (afile['dstpath'], afile['srcpath']) + html = html + '<li><a href="%s">%s</a>' % \ + (".." + afile['dstpath'], afile['srcpath']) if (afile['symlink'] == "yes"): html = html + " (symlink to %s)" % afile['pointsto'] html = html + '</li>\n' @@ -671,10 +672,13 @@ class Plugin(object): if len(self.executedCommands): html = html + "<p>Commands Executed:<br><ul>\n" # convert file name to relative path from our root + # don't use relpath - these are HTML paths not OS paths. for cmd in self.executedCommands: if cmd["file"] and len(cmd["file"]): - cmdOutRelPath = sosRelPath(self.cInfo['rptdir'], self.cInfo['cmddir'] + "/" + cmd['file']) - html = html + '<li><a href="%s">%s</a></li>\n' % (cmdOutRelPath, cmd['exe']) + cmdOutRelPath = "../" + self.cInfo['cmddir'] \ + + "/" + cmd['file'] + html = html + '<li><a href="%s">%s</a></li>\n' % \ + (cmdOutRelPath, cmd['exe']) else: html = html + '<li>%s</li>\n' % (cmd['exe']) html = html + "</ul></p>\n" diff --git a/sos/sosreport.py b/sos/sosreport.py index 582fef08..54478a01 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -679,10 +679,12 @@ class SoSReport(object): section.add(Note(plug.customText)) for f in plug.copiedFiles: - section.add(CopiedFile(name=f["srcpath"], href=f["dstpath"])) + section.add(CopiedFile(name=f['srcpath'], + href= ".." + f['dstpath'])) for cmd in plug.executedCommands: - section.add(Command(name=cmd['exe'], return_code=0, href=cmd['file'])) + section.add(Command(name=cmd['exe'], return_code=0, + href="../" + cmd['file'])) for content, f in plug.copyStrings: section.add(CreatedFile(name=f)) |