mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-11 13:59:18 +03:00
Merge branch '2582_sshfs_crash_while_copying_symlink'
* 2582_sshfs_crash_while_copying_symlink: FISH: Fixed creating relative symlinks Ticket #2582: Crash in 4.8.0-pre1 when copying symlink over ssh
This commit is contained in:
commit
eba55ddb56
@ -1219,18 +1219,16 @@ fish_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2)
|
|||||||
gchar *shell_commands = NULL;
|
gchar *shell_commands = NULL;
|
||||||
char buf[BUF_LARGE];
|
char buf[BUF_LARGE];
|
||||||
const char *crpath;
|
const char *crpath;
|
||||||
char *rpath, *str_path;
|
char *rpath;
|
||||||
struct vfs_s_super *super;
|
struct vfs_s_super *super;
|
||||||
vfs_path_element_t *path_element = vfs_path_get_by_index (vpath1, -1);
|
vfs_path_element_t *path_element = vfs_path_get_by_index (vpath2, -1);
|
||||||
|
|
||||||
crpath = vfs_s_get_path (vpath2, &super, 0);
|
crpath = vfs_s_get_path (vpath2, &super, 0);
|
||||||
if (crpath == NULL)
|
if (crpath == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
rpath = strutils_shell_escape (crpath);
|
|
||||||
|
|
||||||
str_path = vfs_path_to_str (vpath1);
|
rpath = strutils_shell_escape (crpath);
|
||||||
qsetto = strutils_shell_escape (str_path);
|
qsetto = strutils_shell_escape (vfs_path_get_by_index (vpath1, -1)->path);
|
||||||
g_free (str_path);
|
|
||||||
|
|
||||||
shell_commands = g_strconcat (SUP->scr_env, "FISH_FILEFROM=%s FISH_FILETO=%s;\n",
|
shell_commands = g_strconcat (SUP->scr_env, "FISH_FILEFROM=%s FISH_FILETO=%s;\n",
|
||||||
SUP->scr_ln, (char *) NULL);
|
SUP->scr_ln, (char *) NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user