Skip to content

Commit 98dd2f7

Browse files
committed
let dl_database interpret folder paths. fixes MIT-LCP#114
1 parent 9f6aab9 commit 98dd2f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wfdb/io/record.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,9 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
13801380
if rec.endswith('.edf'):
13811381
allfiles.append(rec)
13821382
else:
1383+
# May be pointing to directory
1384+
if rec.endswith('/'):
1385+
rec = rec + rec[:-1]
13831386
# If MIT format, have to figure out all associated files
13841387
allfiles.append(rec+'.hea')
13851388
dirname, baserecname = os.path.split(rec)

0 commit comments

Comments
 (0)