mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-23 14:42:28 +00:00
Duplicate project on remote server use UUID
Ref https://github.com/GNS3/gns3-server/issues/1040
This commit is contained in:
parent
5a86277a9f
commit
39879ca92b
@ -24,7 +24,6 @@ import asyncio
|
|||||||
import zipfile
|
import zipfile
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from ..config import Config
|
|
||||||
from .topology import load_topology
|
from .topology import load_topology
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ def import_project(controller, project_id, stream, location=None, name=None, kee
|
|||||||
path = location
|
path = location
|
||||||
else:
|
else:
|
||||||
projects_path = controller.projects_directory()
|
projects_path = controller.projects_directory()
|
||||||
path = os.path.join(projects_path, project_name)
|
path = os.path.join(projects_path, project_id)
|
||||||
try:
|
try:
|
||||||
os.makedirs(path, exist_ok=True)
|
os.makedirs(path, exist_ok=True)
|
||||||
except UnicodeEncodeError as e:
|
except UnicodeEncodeError as e:
|
||||||
|
@ -23,7 +23,6 @@ import tempfile
|
|||||||
|
|
||||||
from gns3server.web.route import Route
|
from gns3server.web.route import Route
|
||||||
from gns3server.controller import Controller
|
from gns3server.controller import Controller
|
||||||
from gns3server.controller.project import Project
|
|
||||||
from gns3server.controller.import_project import import_project
|
from gns3server.controller.import_project import import_project
|
||||||
from gns3server.controller.export_project import export_project
|
from gns3server.controller.export_project import export_project
|
||||||
from gns3server.config import Config
|
from gns3server.config import Config
|
||||||
|
Loading…
Reference in New Issue
Block a user