From 260fbd8d241013c866b0dc4ef54b73793ee9f501 Mon Sep 17 00:00:00 2001 From: Gustavo Moreira Date: Fri, 2 Feb 2024 17:03:14 +1100 Subject: [PATCH] Python os.path module precisely does that by checking the current platform and, based on it, utilizes either the posixpath or ntpath modules --- test/test_volatility.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/test_volatility.py b/test/test_volatility.py index a5d97ce6e..61e6fe029 100644 --- a/test/test_volatility.py +++ b/test/test_volatility.py @@ -12,7 +12,6 @@ import sys import shutil import tempfile import hashlib -import ntpath import json # @@ -125,11 +124,7 @@ def test_windows_dumpfiles(image, volatility, python): known_files = json.load(json_file) failed_chksms = 0 - - if sys.platform == "win32": - file_name = ntpath.basename(image) - else: - file_name = os.path.basename(image) + file_name = os.path.basename(image) try: for addr in known_files["windows_dumpfiles"][file_name]: