diff --git a/sync b/sync index beed8d9..4be3c82 100755 --- a/sync +++ b/sync @@ -135,11 +135,13 @@ def list_files(reverse: bool = False) -> list[int]: colon = ":" * len_len user_action = input( f"{bcolors.BOLD}{bcolors.BLUE}{colon}{bcolors.ENDC} {bcolors.BOLD}Files to sync (eg: 1 2 3, 1-3):\n{bcolors.BLUE}{colon}{bcolors.ENDC} " - ) + ).strip() # Parse input out = [] - if user_action.count("-") == 0: + if user_action == "": + pass + elif user_action.count("-") == 0: out = list(map(lambda x: int(x), user_action.split())) elif user_action.count("-") == 1: out = list(range(*map(lambda x: int(x), user_action.split("-"))))