Skip to content

Commit ac88048

Browse files
committed
gpkg: Fix S_ISLNK usage
Fixes: 320df52 ("gpkg: avoid os.path.islink where lstat is available") Bug: https://bugs.gentoo.org/942512 Signed-off-by: Zac Medico <[email protected]>
1 parent 33e5f70 commit ac88048

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/portage/gpkg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,7 @@ def _check_pre_image_files(self, root_dir, image_prefix="image"):
19431943

19441944
file_stat = os.lstat(f)
19451945

1946-
if stat.S_ISLNK(file_stat):
1946+
if stat.S_ISLNK(file_stat.st_mode):
19471947
path_link = os.readlink(f)
19481948
path_link_length = len(
19491949
os.fsencode(path_link)
@@ -2035,7 +2035,7 @@ def _check_pre_quickpkg_files(
20352035

20362036
file_stat = os.lstat(path)
20372037

2038-
if stat.S_ISLNK(file_stat):
2038+
if stat.S_ISLNK(file_stat.st_mode):
20392039
path_link = os.readlink(path)
20402040
path_link_length = len(
20412041
_unicode_encode(

0 commit comments

Comments
 (0)