mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 21:07:57 +00:00
Fix issue when searching for image with relative path. Fixes #1925
This commit is contained in:
parent
27bcb60580
commit
6005e89181
@ -544,8 +544,7 @@ class BaseManager:
|
||||
s = os.path.split(searched_file)
|
||||
for root, dirs, files in os.walk(directory):
|
||||
for file in files:
|
||||
# If filename is the same
|
||||
if s[1] == file and (s[0] == '' or os.path.basename(s[0]) == os.path.basename(root)):
|
||||
if s[1] == file and (s[0] == '' or root == os.path.join(directory, s[0])):
|
||||
path = os.path.normpath(os.path.join(root, s[1]))
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
|
Loading…
Reference in New Issue
Block a user