mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-13 17:40:54 +00:00
Read folder structure correctly for custom symbols. Fixes https://github.com/GNS3/gns3-gui/issues/2856
This commit is contained in:
parent
3dc4ea46d6
commit
a9e9ff071d
@ -99,10 +99,13 @@ class Symbols:
|
||||
if filename.startswith('.'):
|
||||
continue
|
||||
symbol_file = posixpath.normpath(os.path.relpath(os.path.join(root, filename), directory)).replace('\\', '/')
|
||||
theme = posixpath.dirname(symbol_file).replace('/', '-').capitalize()
|
||||
if not theme:
|
||||
theme = "Custom symbols"
|
||||
symbols.append({'symbol_id': symbol_file,
|
||||
'filename': filename,
|
||||
'builtin': False,
|
||||
'theme': "Custom symbols"})
|
||||
'theme': theme})
|
||||
self._symbols_path[symbol_file] = os.path.join(root, filename)
|
||||
|
||||
symbols.sort(key=lambda x: x["filename"])
|
||||
|
Loading…
Reference in New Issue
Block a user