diff --git a/nefile/resources/icon.py b/nefile/resources/icon.py index 0b89377..23247df 100644 --- a/nefile/resources/icon.py +++ b/nefile/resources/icon.py @@ -29,8 +29,7 @@ def __init__(self, stream, resource_declaration, resource_table): ## An ICO extension will be added if it isn't already present. def export(self, export_filepath): ICO_FILENAME_EXTENSION = '.ico' - filename_extension_present = (export_filepath[:-4].lower() == ICO_FILENAME_EXTENSION) - if not filename_extension_present: + if not export_filepath.lower().endswith(ICO_FILENAME_EXTENSION): export_filepath += ICO_FILENAME_EXTENSION # CALCULATE THE IMAGE OFFSETS.