mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +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;
|
||||
char buf[BUF_LARGE];
|
||||
const char *crpath;
|
||||
char *rpath, *str_path;
|
||||
char *rpath;
|
||||
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);
|
||||
if (crpath == NULL)
|
||||
return -1;
|
||||
rpath = strutils_shell_escape (crpath);
|
||||
|
||||
str_path = vfs_path_to_str (vpath1);
|
||||
qsetto = strutils_shell_escape (str_path);
|
||||
g_free (str_path);
|
||||
rpath = strutils_shell_escape (crpath);
|
||||
qsetto = strutils_shell_escape (vfs_path_get_by_index (vpath1, -1)->path);
|
||||
|
||||
shell_commands = g_strconcat (SUP->scr_env, "FISH_FILEFROM=%s FISH_FILETO=%s;\n",
|
||||
SUP->scr_ln, (char *) NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user