mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-20 16:20:18 +00:00
Save empty directories when exporting a project
This commit is contained in:
@ -83,6 +83,11 @@ async def export_project(zstream, project, temporary_dir, include_images=False,
|
||||
continue
|
||||
_patch_mtime(path)
|
||||
zstream.write(path, os.path.relpath(path, project._path))
|
||||
# save empty directories
|
||||
for directory in dirs:
|
||||
path = os.path.join(root, directory)
|
||||
if not os.listdir(path):
|
||||
zstream.write(path, os.path.relpath(path, project._path))
|
||||
except FileNotFoundError as e:
|
||||
log.warning("Cannot export local file: {}".format(e))
|
||||
continue
|
||||
|
Reference in New Issue
Block a user