From 55df82dd89d97bcb229f2ebd9c37387330092025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Wed, 12 Apr 2023 01:19:11 +0200 Subject: [PATCH] Fixing is_valid_path --- .github/db_operator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/db_operator.py b/.github/db_operator.py index 1e7ede991..b894703af 100755 --- a/.github/db_operator.py +++ b/.github/db_operator.py @@ -202,7 +202,7 @@ def is_valid_url(url: str) -> bool: def is_valid_path(path: str) -> bool: try: p = Path(path) - if not p.is_relative() or len(path) < 3: + if p.is_absolute() or len(path) < 3: return False for part in p.parts: @@ -210,7 +210,8 @@ def is_valid_path(path: str) -> bool: return False return True - except Exception: + except Exception as e: + print(e) return False def is_valid_size(size: str) -> bool: