25 lines
1023 B
Diff
25 lines
1023 B
Diff
Based on: https://gitlab.gnome.org/GNOME/file-roller/-/issues/148#note_1382009
|
|
|
|
file-roller assumes p7zip and assumes that 'follow_links' is disabled by default.
|
|
This is true in p7zip but not 7zip. 7zip does not have a -l flag, and instead provides,
|
|
the -snl and -snh flags for disabling 'follow_links'.
|
|
|
|
This fixes compressing 7z files with 'follow_links' enabled and compressing files with
|
|
broken symlinks with 'follow_links' disabled.
|
|
--- a/src/fr-command-7z.c.orig
|
|
+++ b/src/fr-command-7z.c
|
|
@@ -325,8 +325,11 @@ fr_command_7z_add (FrCommand *command,
|
|
fr_process_add_arg (command->process, "-bd");
|
|
fr_process_add_arg (command->process, "-bb1");
|
|
fr_process_add_arg (command->process, "-y");
|
|
- if (follow_links)
|
|
- fr_process_add_arg (command->process, "-l");
|
|
+ if (! follow_links)
|
|
+ {
|
|
+ fr_process_add_arg (command->process, "-snh");
|
|
+ fr_process_add_arg (command->process, "-snl");
|
|
+ }
|
|
add_password_arg (command, archive->password, FALSE);
|
|
if ((archive->password != NULL)
|
|
&& (*archive->password != 0)
|