Skip past symlinks and problems in oglive modification

fixes2
Vadim vtroshchinskiy 2024-11-26 12:52:47 +01:00
parent 30fccad54d
commit 47ccba0adf
1 changed files with 8 additions and 0 deletions

View File

@ -428,6 +428,14 @@ class OpengnsysGitInstaller:
#self.__logger.debug("%s", abs_path) #self.__logger.debug("%s", abs_path)
digest = None digest = None
if os.path.islink(abs_path):
self.__logger.debug("%s is a symlink", abs_path)
continue
if not os.path.exists(abs_path):
self.__logger.debug("%s does not exist", abs_path)
continue
stat_data = os.stat(abs_path) stat_data = os.stat(abs_path)
with open(full_path, "rb") as in_file: with open(full_path, "rb") as in_file:
digest = hashlib.file_digest(in_file, "sha256").hexdigest() digest = hashlib.file_digest(in_file, "sha256").hexdigest()