Skip to content

Commit 6db596d

Browse files
Fixed symbolic file target path
1 parent 8db79f6 commit 6db596d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vtr_flow/scripts/download_noc_mlp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ def find_and_link_files(base_path, target_extension, link_folder_name):
185185

186186
# Create symbolic link in the link folder
187187
link_name = os.path.join(link_folder_path, file)
188+
file_relative_path = os.path.relpath(file_path, start=link_folder_path)
189+
188190
try:
189-
os.symlink(file_path, link_name)
191+
os.symlink(file_relative_path, link_name)
190192
except OSError as e:
191193
if e.errno == errno.EEXIST:
192194
os.remove(link_name)
193-
os.symlink(file_path, link_name)
194-
else:
195-
raise e
195+
os.symlink(file_relative_path, link_name)
196196

197197

198198
if __name__ == "__main__":

0 commit comments

Comments
 (0)