commit: ac88048bb1d6a28dbd415223e2e0fc3ec8b16a6c Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Nov 2 22:10:44 2024 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Nov 2 22:11:47 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ac88048b
gpkg: Fix S_ISLNK usage Fixes: 320df528974c ("gpkg: avoid os.path.islink where lstat is available") Bug: https://bugs.gentoo.org/942512 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/gpkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portage/gpkg.py b/lib/portage/gpkg.py index e9347919cc..53785c2711 100644 --- a/lib/portage/gpkg.py +++ b/lib/portage/gpkg.py @@ -1943,7 +1943,7 @@ class gpkg: file_stat = os.lstat(f) - if stat.S_ISLNK(file_stat): + if stat.S_ISLNK(file_stat.st_mode): path_link = os.readlink(f) path_link_length = len( os.fsencode(path_link) @@ -2035,7 +2035,7 @@ class gpkg: file_stat = os.lstat(path) - if stat.S_ISLNK(file_stat): + if stat.S_ISLNK(file_stat.st_mode): path_link = os.readlink(path) path_link_length = len( _unicode_encode(