diff --git a/Source/Python/src/LightwaveExplorer/LightwaveExplorer.py b/Source/Python/src/LightwaveExplorer/LightwaveExplorer.py index 4db5aae7..d95e166a 100644 --- a/Source/Python/src/LightwaveExplorer/LightwaveExplorer.py +++ b/Source/Python/src/LightwaveExplorer/LightwaveExplorer.py @@ -94,8 +94,7 @@ def __init__(self, filePath: str, loadFieldArray=True): if filePath.endswith(".zip"): isZip = True archive = zipfile.ZipFile(filePath, "r") - directory, archiveName = os.path.split(filePath) - fileBase, baseExtension = os.path.splitext(archiveName) + fileBase = next(name for name in archive.namelist() if name.lower().endswith(".txt"))[:-4] settingsFile = archive.open(fileBase + ".txt") settingsFile = io.TextIOWrapper(settingsFile, "utf-8")