Skip to content

After moving to pathlib, searching for modelsim.ini is done in a different directory #632

@suoto

Description

@suoto

When moving to using pathlib (commit 1af5128) I believe there's a mistake here

def has_modelsim_ini(path):
return os.path.isfile(str(Path(path) / "modelsim.ini"))

The previous code searched for modelsim.ini one level above the executable:

def has_modelsim_ini(path): 
     return os.path.isfile(join(path, "..", "modelsim.ini")) 

A suggested fix would be

def has_modelsim_ini(path):
    return os.path.isfile(str(Path(path).parent / "modelsim.ini"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions