[Xfce4-commits] r25429 - squeeze/trunk/libsqueeze
Stephan Arts
stephan at xfce.org
Sat Apr 7 15:16:06 CEST 2007
Author: stephan
Date: 2007-04-07 13:16:06 +0000 (Sat, 07 Apr 2007)
New Revision: 25429
Modified:
squeeze/trunk/libsqueeze/command-builder-gnu-tar.c
squeeze/trunk/libsqueeze/command-builder-rar.c
squeeze/trunk/libsqueeze/command-builder-zip.c
Log:
escape destination-path
Modified: squeeze/trunk/libsqueeze/command-builder-gnu-tar.c
===================================================================
--- squeeze/trunk/libsqueeze/command-builder-gnu-tar.c 2007-04-07 13:12:01 UTC (rev 25428)
+++ squeeze/trunk/libsqueeze/command-builder-gnu-tar.c 2007-04-07 13:16:06 UTC (rev 25429)
@@ -371,10 +371,12 @@
lsq_command_builder_gnu_tar_build_extract(LSQCommandBuilder *builder, LSQArchive *archive, const gchar *dest_path, GSList *file_iters)
{
gchar *files = lsq_concat_iter_filenames(file_iters);
- gchar *options = g_strconcat(" -C ", dest_path, NULL);
+ gchar *_dest_path = g_shell_quote(dest_path);
+ gchar *options = g_strconcat(" -C ", _dest_path, NULL);
LSQArchiveCommand *spawn = lsq_spawn_command_new(_("Extracting"), archive, "tar %3$s -x -f %1$s %2$s", files, options, NULL);
+ g_free(_dest_path);
g_free(options);
g_free(files);
return spawn;
Modified: squeeze/trunk/libsqueeze/command-builder-rar.c
===================================================================
--- squeeze/trunk/libsqueeze/command-builder-rar.c 2007-04-07 13:12:01 UTC (rev 25428)
+++ squeeze/trunk/libsqueeze/command-builder-rar.c 2007-04-07 13:16:06 UTC (rev 25429)
@@ -204,7 +204,7 @@
lsq_command_builder_rar_build_extract(LSQCommandBuilder *builder, LSQArchive *archive, const gchar *dest_path, GSList *file_iters)
{
gchar *files = lsq_concat_iter_filenames(file_iters);
- gchar *options = g_strconcat(dest_path, NULL);
+ gchar *options = g_shell_quote(dest_path);
LSQArchiveCommand *spawn = lsq_spawn_command_new(_("Extracting"), archive, "unrar x -y %1$s %2$s %3$s", files, options, NULL);
Modified: squeeze/trunk/libsqueeze/command-builder-zip.c
===================================================================
--- squeeze/trunk/libsqueeze/command-builder-zip.c 2007-04-07 13:12:01 UTC (rev 25428)
+++ squeeze/trunk/libsqueeze/command-builder-zip.c 2007-04-07 13:16:06 UTC (rev 25429)
@@ -178,10 +178,12 @@
lsq_command_builder_zip_build_extract(LSQCommandBuilder *builder, LSQArchive *archive, const gchar *dest_path, GSList *file_iters)
{
gchar *files = lsq_concat_iter_filenames(file_iters);
- gchar *options = g_strconcat(" -d ", dest_path, NULL);
+ gchar *_dest_path = g_shell_quote(dest_path);
+ gchar *options = g_strconcat(" -d ", _dest_path, NULL);
LSQArchiveCommand *spawn = lsq_spawn_command_new(_("Extracting"), archive, "unzip -o %1$s %2$s %3$s", files, options, NULL);
+ g_free(_dest_path);
g_free(options);
g_free(files);
return spawn;
More information about the Xfce4-commits
mailing list