mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix some bugs on windows
This commit is contained in:
5 files changed
+14
-8
No files matched your search
@@ -472,7 +472,6 @@ def _convert_snapshots(topo_dir):
|
||||
for root, dirs, files in os.walk(snapshot_dir):
|
||||
for file in files:
|
||||
myzip.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), snapshot_dir), compress_type=zipfile.ZIP_DEFLATED)
|
||||
shutil.copy(snapshot_arc, "/tmp/test.zip")
|
||||
|
||||
shutil.rmtree(old_snapshots_dir)
|
||||
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
|
||||
|
||||
import re
|
||||
import os
|
||||
import textwrap
|
||||
import posixpath
|
||||
|
||||
import pathlib
|
||||
|
||||
def force_unix_path(path):
|
||||
"""
|
||||
:param path: Path to convert
|
||||
"""
|
||||
|
||||
path = path.replace("\\", "/")
|
||||
return posixpath.normpath(path)
|
||||
p = pathlib.Path(os.path.normpath(path))
|
||||
return p.as_posix()
|
||||
|
||||
|
||||
def macaddress_to_int(mac_address):
|
||||
|
||||
Reference in new issue
Block a user