Closed sonic2kk closed 12 months ago
Interesting. Not sure how I missed that. I think I mixed up GE-Proton and Proton-Tkg while testing, the same happened to me while writing the release notes :facepalm:
Too many Protons if you ask me :sweat_smile: And not enough wine to manage them all :wine_glass:
Fixes two issues I (introduced and) found while testing the v2.8.1 Flatpak. They are not specific to Flatpak, I just found them during testing flathub/net.davidotek.pupgui2#18.
extract_tar
doesn't work for regular.tar
filesThis is due to a bug where the default mode is
r
and gets garbled intor:r
. This produces the error "unknown compression type 'r'". This happens becauseif not mode.startswith('r:')
then we set it tor:{mode}
. When the mode is left to the default parameter, which isr
, this gets garbled tor:r
(because{mode}
isr
). Havingr
on its own is also a valid argument totarfile.extractall
, but changing the default parameter tor:
is very "elegant" and doesn't require any refactoring.The fix for this bug is to set the default parameter to
r:
. Settingr:*
is also valid. When having the default asr:
, the startswith check will pass and we won't garble the mode parameter.This is a regression from #250, and is the main "urgent" regression as it breaks Proton-tkg.
Incorrect Archive Globbing in Temp Dir
If there were two, say,
tar.zst
files in the temp dir, then the wrong one may be extracted. Since we just "glob" for the extension and assume there will only be one. To fix this, we clean up archives after extraction with aremove_if_exists
. I considered updating the extraction functions to do this automatically, or take a parameter to do this, but I figured that might not be very useful since this behaviour is specific to Proton-tkg and its flavours (since we don't glob elsewhere afaik).I ran into this issue when testing different Tkg flavours, and noticed the incorrect archive was being extracted. Existing archives will be cleaned up when ProtonUp-Qt is closed, as the temp dir is cleared.
This regression is possibly from #238, I am not sure. Since this is more of an edge case and has a workaround, this one is a bit less "urgent" but I fixed it here anyway.
Not sure if this warrants another release, since Proton-tkg is broken on v2.8.1 AppImage/source. I have no preference either way :smile: