summaryrefslogtreecommitdiff
path: root/src/fr-command-7z.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-7z.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-7z.c')
-rw-r--r--src/fr-command-7z.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index dde039e..29af8cf 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -287,10 +287,14 @@ process_line__add (char *line,
FrCommand *comm = FR_COMMAND (data);
if ((comm->volume_size > 0) && (strncmp (line, "Creating archive ", 17) == 0)) {
- char *volume_filename;
+ char *volume_filename;
+ GFile *volume_file;
volume_filename = g_strconcat (comm->filename, ".001", NULL);
- 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);
}