mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Use POSIX path for symbol ID.
This commit is contained in:
1 parent
17d070dca7
commit
51787295dd
1 file changed
+3
-2
@@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import posixpath
|
||||
|
||||
from .symbol_themes import BUILTIN_SYMBOL_THEMES
|
||||
from ..utils.get_resource import get_resource
|
||||
@@ -65,7 +66,7 @@ class Symbols:
|
||||
for filename in files:
|
||||
if filename.startswith('.'):
|
||||
continue
|
||||
symbol_file = os.path.relpath(os.path.join(root, filename), get_resource("symbols"))
|
||||
symbol_file = posixpath.normpath(os.path.relpath(os.path.join(root, filename), get_resource("symbols")))
|
||||
symbol_id = ':/symbols/' + symbol_file
|
||||
symbols.append({'symbol_id': symbol_id,
|
||||
'filename': symbol_file,
|
||||
@@ -78,7 +79,7 @@ class Symbols:
|
||||
for filename in files:
|
||||
if filename.startswith('.'):
|
||||
continue
|
||||
symbol_file = os.path.relpath(os.path.join(root, filename), directory)
|
||||
symbol_file = posixpath.normpath(os.path.relpath(os.path.join(root, filename), directory))
|
||||
symbols.append({'symbol_id': symbol_file,
|
||||
'filename': symbol_file,
|
||||
'builtin': False,})
|
||||
|
||||
Reference in new issue
Block a user