Skip to content

Commit

Permalink
Fix IOU symlink issue on remote servers.
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Mar 18, 2019
1 parent 8e8985c commit e291ec1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gns3server/compute/iou/iou_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,13 @@ def stop(self):
pass
self._iou_process = None

try:
symlink = os.path.join(self.working_dir, os.path.basename(self.path))
if os.path.islink(symlink):
os.unlink(symlink)
except OSError as e:
log.warning("Could not delete symbolic link: {}".format(e))

self._started = False
self.save_configs()

Expand Down
2 changes: 1 addition & 1 deletion gns3server/compute/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def list_files(self):
"""

files = []
for dirpath, dirnames, filenames in os.walk(self.path):
for dirpath, dirnames, filenames in os.walk(self.path, followlinks=False):
for filename in filenames:
if not filename.endswith(".ghost"):
path = os.path.relpath(dirpath, self.path)
Expand Down

0 comments on commit e291ec1

Please sign in to comment.