Skip to content

Commit

Permalink
[copy_files] Omit path name
Browse files Browse the repository at this point in the history
  • Loading branch information
KanRobert committed Sep 24, 2024
1 parent 1a93a08 commit 99f50b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion copy_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
for row in csv_reader:
new_row = row.copy()
sim_files = row['sim_files'].split(',')
exe = row['exe']
new_row['exe'] = os.path.basename(exe)
new_row['sim_files'] = ','.join([os.path.basename(sim_file) for sim_file in sim_files])

sub_dir = os.path.join(args.dst, new_row['name'])
if os.path.isdir(sub_dir):
shutil.rmtree(sub_dir)
os.mkdir(sub_dir)
exe = new_row['exe']
to_exe = os.path.join(sub_dir, os.path.basename(exe))
# Avoid duplicated copies
if exe in exe_from_to:
Expand Down

0 comments on commit 99f50b3

Please sign in to comment.