Skip to content

Commit 92a7c6e

Browse files
authored
Update cli.py
1 parent fe526bd commit 92a7c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

caltechdata_api/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def upload_supporting_file(record_id=None):
407407
print((f"{idx}/ \n").join(files))
408408
while True:
409409
filename = get_user_input(
410-
"Enter the filename to upload as a supporting file (or '*' to get all files currently in the directory, or the index number of the file as displayed followed by a /, otherwise 'n' to finish): "
410+
"Enter the filename to upload as a supporting file (or '*' to get all files currently in this directory, or the index number of the file as displayed followed by a /, otherwise 'n' to finish): "
411411
)
412412
if filename == "*":
413413
for files_name in files:
@@ -416,7 +416,7 @@ def upload_supporting_file(record_id=None):
416416
print("All files added successfully")
417417
elif filename == "n":
418418
break
419-
elif filename == "":
419+
elif (not len(filename) == 0) and (filename[len(filename) - 1] == '/'):
420420
files_name = files[int(filename[0])-1]
421421
filepath = os.path.abspath(files_name)
422422
filepaths.append(filepath)

0 commit comments

Comments
 (0)