diff --git a/devicons.py b/devicons.py index a698070..d69292f 100644 --- a/devicons.py +++ b/devicons.py @@ -319,4 +319,4 @@ def devicon(file): if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '') - return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, '')) + return file_node_exact_matches.get(os.path.basename(file.relative_path), file_node_extensions.get(file.extension, ''))