Skip to content

Commit 63a573a

Browse files
committed
basedir_len * 2
1 parent 0d18fdd commit 63a573a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qiita_pet/handlers/download.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,10 @@ def get(self):
429429
infofile._filepath_table, infofile._id_column, infofile.id,
430430
sort='descending')[0]
431431

432-
basedir_len = len(get_db_files_base_dir()) + 1
432+
basedir = get_db_files_base_dir()
433+
basedir_len = len(basedir)
434+
if not basedir.endswith('/'):
435+
basedir_len += 1
433436
fp = x['fp'][basedir_len:]
434437
to_download.append((fp, fp, '-', str(x['fp_size'])))
435438
self._write_nginx_file_list(to_download)

0 commit comments

Comments
 (0)