Skip to content

Commit

Permalink
Add additional check for differently named Fedora-based distros (#780)
Browse files Browse the repository at this point in the history
Bazzite is Fedora-based but fails the `distro.id() == 'fedora'` check because `distro.id()` resolves to "bazzite." I added an additional check to include `distro.like() == 'fedora'` for situations like this.

This needs to be formatted as an or statement because plain Fedora resolves `distro.like()` as a null string.
  • Loading branch information
termdisc authored Dec 13, 2024
1 parent 4769f68 commit ae475e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kindlecomicconverter/comicarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def type(self):
['7z', 'l', '-y', '-p1', self.filepath],
]

if distro.id() == 'fedora':
if distro.id() == 'fedora' or distro.like() == 'fedora':
extraction_commands.append(
['unrar', 'l', '-y', '-p1', self.filepath],
)
Expand Down Expand Up @@ -76,7 +76,7 @@ def extract(self, targetdir):
['unar', self.filepath, '-f', '-o', targetdir]
)

if distro.id() == 'fedora':
if distro.id() == 'fedora' or distro.like() == 'fedora':
extraction_commands.append(
['unrar', 'x', '-y', '-x__MACOSX', '-x.DS_Store', '-xthumbs.db', '-xThumbs.db', self.filepath, targetdir]
)
Expand Down

0 comments on commit ae475e7

Please sign in to comment.