Skip to content

Commit

Permalink
Use audeer.path() when loading attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Jan 23, 2024
1 parent fb917f1 commit 7e93b4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions audb/core/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ def job(path: str):
version,
tmp_root=db_root_tmp,
)
src_path = os.path.join(db_root_tmp, path)
dst_path = os.path.join(db_root, path)
src_path = audeer.path(db_root_tmp, path)
dst_path = audeer.path(db_root, path)
audeer.mkdir(os.path.dirname(dst_path))
audeer.move_file(
src_path,
Expand Down Expand Up @@ -576,7 +576,7 @@ def _load_attachments(
missing_attachments = []
for attachment in attachments:
path = db.attachments[attachment].path
path = os.path.join(db_root, path)
path = audeer.path(db_root, path)
if not os.path.exists(path):
missing_attachments.append(attachment)

Expand Down

0 comments on commit 7e93b4e

Please sign in to comment.