From f157301c4db069f51ff1fb0d25ebbc0acb8f9c3b Mon Sep 17 00:00:00 2001 From: Johnny Sequeira Date: Thu, 24 Oct 2024 00:22:14 -0600 Subject: [PATCH] Giving some air --- libqfieldsync/utils/file_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libqfieldsync/utils/file_utils.py b/libqfieldsync/utils/file_utils.py index 70658e8..e50fd2b 100644 --- a/libqfieldsync/utils/file_utils.py +++ b/libqfieldsync/utils/file_utils.py @@ -191,6 +191,7 @@ def isascii(filename: str) -> bool: except UnicodeEncodeError: return False + def is_valid_filename(filename: str) -> bool: """ Check if the filename is valid. @@ -201,8 +202,10 @@ def is_valid_filename(filename: str) -> bool: r'[^\\\/:*"?<>|]{1,254}' r"(? bool: """ Check if the entire path is valid by validating each part of the path. @@ -211,4 +214,5 @@ def is_valid_filepath(path: str) -> bool: for part in path_obj.parts: if not is_valid_filename(part): return False - return True \ No newline at end of file + + return True