summaryrefslogtreecommitdiff
path: root/src/fr-command-rar.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-21 15:31:24 +0100
committerinfirit <[email protected]>2014-11-22 20:25:29 +0100
commited78c6d2d8e5ff3b8ae7edd633cce3a266e58d5d (patch)
treeb9924ec79e5b4cc15dcc15800aa6a72fbee0fe97 /src/fr-command-rar.c
parentbfd0f05763c3baa877f696ee5b20f7d5e2f740c2 (diff)
downloadengrampa-ed78c6d2d8e5ff3b8ae7edd633cce3a266e58d5d.tar.bz2
engrampa-ed78c6d2d8e5ff3b8ae7edd633cce3a266e58d5d.tar.xz
FrCommand: set the filename before each call to fr_command_* functions
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]>
Diffstat (limited to 'src/fr-command-rar.c')
-rw-r--r--src/fr-command-rar.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index 4daa9fa..bc84229 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -403,11 +403,15 @@ process_line__add (char *line,
if ((comm->volume_size > 0)
&& g_regex_match_simple ("^.*\\.part(0)*2\\.rar$", uri, G_REGEX_CASELESS, 0))
{
- char *volume_filename;
+ char *volume_filename;
+ GFile *volume_file;
volume_filename = g_strdup (archive_filename);
volume_filename[strlen (volume_filename) - 5] = '1';
- fr_command_set_multi_volume (comm, volume_filename);
+ volume_file = g_file_new_for_path (volume_filename);
+ fr_command_set_multi_volume (comm, volume_file);
+
+ g_object_unref (volume_file);
g_free (volume_filename);
}
fr_command_working_archive (comm, uri);