mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
(operate_single_file): make src and dest file name unescaping
...as it made in operate_one_file. (build_dest): make dest file name unescaping here. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
1071c232c7
commit
ef5d346dd9
@ -277,7 +277,10 @@ build_dest (file_op_context_t * ctx, const char *src, const char *dest, FileProg
|
||||
|
||||
g_free (q);
|
||||
|
||||
return s;
|
||||
q = strutils_shell_unescape (s);
|
||||
g_free (s);
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
@ -1714,12 +1717,19 @@ operate_single_file (const WPanel * panel, FileOperation operation, file_op_tota
|
||||
temp = build_dest (ctx, src, dest, &value);
|
||||
if (temp != NULL)
|
||||
{
|
||||
char *src2;
|
||||
|
||||
src2 = strutils_shell_unescape (src);
|
||||
|
||||
src = src2;
|
||||
dest = temp;
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
case OP_COPY:
|
||||
/* we use file_mask_op_follow_links only with OP_COPY */
|
||||
vfs_path_free (src_vpath);
|
||||
src_vpath = vfs_path_from_str (src);
|
||||
ctx->stat_func (src_vpath, src_stat);
|
||||
is_file = !S_ISDIR (src_stat->st_mode);
|
||||
|
||||
@ -1741,6 +1751,7 @@ operate_single_file (const WPanel * panel, FileOperation operation, file_op_tota
|
||||
abort ();
|
||||
}
|
||||
|
||||
g_free (src2);
|
||||
g_free (temp);
|
||||
}
|
||||
}
|
||||
@ -1784,14 +1795,12 @@ operate_one_file (const WPanel * panel, FileOperation operation, file_op_total_c
|
||||
temp = build_dest (ctx, src, dest, &value);
|
||||
if (temp != NULL)
|
||||
{
|
||||
char *src2, *temp2;
|
||||
char *src2;
|
||||
|
||||
src2 = strutils_shell_unescape (src);
|
||||
temp2 = strutils_shell_unescape (temp);
|
||||
g_free (temp);
|
||||
|
||||
src = src2;
|
||||
dest = temp2;
|
||||
dest = temp;
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
@ -1822,7 +1831,7 @@ operate_one_file (const WPanel * panel, FileOperation operation, file_op_total_c
|
||||
}
|
||||
|
||||
g_free (src2);
|
||||
g_free (temp2);
|
||||
g_free (temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user