mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-28 13:30:00 +00:00
Use os.path.join() for path manipulation in reportmodule.py,
rather than hardcoding backslash
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
from java.lang import System
|
||||
from org.sleuthkit.autopsy.casemodule import Case
|
||||
from org.sleuthkit.autopsy.report import GeneralReportModuleAdapter
|
||||
import os
|
||||
|
||||
# TODO: Rename this to something more specific
|
||||
class SampleGeneralReportModule(GeneralReportModuleAdapter):
|
||||
@@ -73,10 +74,10 @@ class SampleGeneralReportModule(GeneralReportModuleAdapter):
|
||||
progressBar.increment()
|
||||
|
||||
# Write the result to the report file.
|
||||
report = open(baseReportDir + '\\' + self.getRelativeFilePath(), 'w')
|
||||
report = open(os.path.join(baseReportDir, self.getRelativeFilePath()), 'w')
|
||||
report.write("file count = %d" % fileCount)
|
||||
Case.getCurrentCase().addReport(report.name, "SampleGeneralReportModule", "Sample Python Report");
|
||||
report.close()
|
||||
|
||||
progressBar.increment()
|
||||
progressBar.complete()
|
||||
progressBar.complete()
|
||||
|
||||
Reference in New Issue
Block a user