summaryrefslogtreecommitdiff
path: root/src/fr-command-rar.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-31rar: Actually accept unrar-free as the executable nameColomban Wendling1-20/+30
I had been relying on `unrar-free` being available as `unrar`, but that seems to be a Debian thing, so accept the `unrar-free` itself as an alternative. The code has been refactored a little to avoid some duplication, but it basically just adds `unrar-free` as a lower precedence alternative.
2024-01-31rar: Add support for unrar-freeColomban Wendling1-9/+22
Tested with unrar-free 0.1.3.
2024-01-31rar: Fix out of bounds read on malformed outputColomban Wendling1-18/+25
Check the fields count before retrieving it not to go out of bounds. This also slightly revise the logic to require the proper number of fields in the RAR5 `attribute_field_with_space()` case.
2024-01-31rar: Simplify and merge duplicate codeColomban Wendling1-20/+4
Merge version matching for rar and unrar. This is ever so slightly slower in theory for unrar 5.x because there's an additional unnecessary `sscanf()` call, but it's not actually gonna matter, and saves quite a bit of duplicated logic. This also makes the matching a bit more safe by verifying `sscanf()` actually worked, and avoids using a uninitialized `version` value due to an unexpected input. Finally, this makes the parsing a bit more strict by requiring a version number after the `RAR` and `UNRAR` line prefixes -- leading not to using the uninitialized version variable. This will be required by the upcoming unrar-free support as it reports a `RAR archive ...` line that would have matched the `RAR` version check.
2023-03-22fr-command-rar: Parameter 'line' can be declared with constrbuj1-1/+1
2023-03-15fr-command-rar: parse date & time using strptimerbuj1-32/+7
2022-01-28Fix -Wimplicit-int-conversion warningrbuj1-2/+2
2021-12-11Use a blank line at mostrbuj1-26/+0
2021-02-17rar 6.00: fix listing archive content with encrypted file listrbuj1-12/+4
2019-09-03Missing initializer for struct fieldrbuj1-1/+2
caja-engrampa.c:439:2: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’} [-Wmissing-field-initializers] eggtreemultidnd.c:70:2: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command.c:98:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-7z.c:750:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-ace.c:334:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-alz.c:397:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-ar.c:383:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-arj.c:429:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command.c:98:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-cfile.c:692:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-cpio.c:319:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-dpkg.c:305:17: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-iso.c:308:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-jar.c:234:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-lha.c:408:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-lrzip.c:262:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-rar.c:832:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-rpm.c:319:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-tar.c:1267:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-unarchiver.c:361:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-unstuff.c:381:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-zip.c:513:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-command-zoo.c:419:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-window.c:839:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] fr-list-model.c:148:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘const struct _GTypeInfo’} [-Wmissing-field-initializers] fr-process.c:248:3: warning: missing initializer for field ‘value_table’ of ‘GTypeInfo’ {aka ‘struct _GTypeInfo’} [-Wmissing-field-initializers] ui.h:32:2: warning: missing initializer for field ‘accelerator’ of ‘GtkActionEntry’ {aka ‘struct _GtkActionEntry’} [-Wmissing-field-initializers] ui.h:33:2: warning: missing initializer for field ‘accelerator’ of ‘GtkActionEntry’ {aka ‘struct _GtkActionEntry’} [-Wmissing-field-initializers] ui.h:34:2: warning: missing initializer for field ‘accelerator’ of ‘GtkActionEntry’ {aka ‘struct _GtkActionEntry’} [-Wmissing-field-initializers] ui.h:35:2: warning: missing initializer for field ‘accelerator’ of ‘GtkActionEntry’ {aka ‘struct _GtkActionEntry’} [-Wmissing-field-initializers] ui.h:36:2: warning: missing initializer for field ‘accelerator’ of ‘GtkActionEntry’ {aka ‘struct _GtkActionEntry’} [-Wmissing-field-initializers]
2019-07-01Remove trailing whitespacesLaurent Napias1-2/+2
2019-06-11Update FSF addressLaurent Napias1-1/+1
2019-01-03rar/unrar: Fix: "overwrite existing files" disabled must workPablo Barciela1-1/+1
Fixes https://github.com/mate-desktop/engrampa/issues/243
2017-03-13check the rar/unrar version to work the new date style with all versionsZenWalker1-3/+34
rar 5.30 and later uses YYYY-MM-DD instead DD-MM-YY in the listing output
2017-03-12Fix: rar file listing now shows correct date with recent binarykn00tcn1-35/+56
rar before version 5.30 used DD-MM-YY, but versions since then use YYYY-MM-DD, most people using rar would and should be using recent versions this fix reorders the string split so year is first and day is last in order to show the correct date when using rar version 5.30 onward the newer date format matches the one used by tar, so based on tar's code, this fix replaces support for year strings to four characters instead of two updated example listing output for rar versions is included and moved right before the time function instead of right after
2016-02-04rar: avoid "No files to extract" Fixes #123ZenWalker1-1/+1
2015-07-21fr-command-rar: additional check for NULL pointer to avoid crashMonsta1-0/+3
adapted from https://github.com/GNOME/file-roller/commit/8c55a4118dc83f171ca89407492269ecfe0a20d3
2014-11-22fixed missing prototype warninginfirit1-2/+2
From FR commit: fe3e6aa60ff370fb21475cf621fd86ad78c9303a From: Paolo Bacchilega <[email protected]>
2014-11-22fixed compiler warningsinfirit1-1/+2
Based on FR commit: 1becb98e4c8bc86feca13b54f991987c4eee3341 From: Paolo Bacchilega <[email protected]>
2014-11-22progress dialog: show the number of remaining files to complete the operationinfirit1-31/+2
instead of the name of the file added/removed/extracted. Based on FR commit: bf2b5d2352cfcd9d4345dda7976208672838dce1 From: Paolo Bacchilega <[email protected]>
2014-11-22FrCommand: set the filename before each call to fr_command_* functionsinfirit1-2/+6
this change will allow the command to use a different filename from the one pointed to by the local_copy attribute. Based on FR commit: 5e48592fb49d1f5ce713fcd77d44acd664de4b6a From: Paolo Bacchilega <[email protected]>
2014-11-19Fixed loading of multi-volume rar archives with 7zipinfirit1-110/+1
Based on FR commit: e4a225d986cb6df8c6586515cba0e13aee888544 From: Paolo Bacchilega <[email protected]>
2014-07-11Fix possible errors with some password protected filesmonsta1-7/+23
2013-10-07add support for rar-5.0xraveit651-42/+126
2012-11-17Can't open rar files with password protected file data and headers.Steve Zesch1-0/+6
2012-10-09Fixed fsf addresses. Closes #4.Steve Zesch1-1/+1
2011-11-30many renames from file-roller to engrampaStefano Karapetsas1-1/+1
2011-11-09initialPerberos1-0/+813