mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #2923: broken aliases in SFTPFS.
(sftpfs_correct_file_name): fix handling of tilde-starting file names. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
97e37308b9
commit
f2c94d53d2
@ -32,6 +32,7 @@
|
|||||||
#include "lib/global.h"
|
#include "lib/global.h"
|
||||||
|
|
||||||
#include "lib/search.h"
|
#include "lib/search.h"
|
||||||
|
#include "lib/util.h" /* tilde_expand() */
|
||||||
#include "lib/vfs/utilvfs.h"
|
#include "lib/vfs/utilvfs.h"
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
@ -120,7 +121,9 @@ sftpfs_correct_file_name (const char *filename)
|
|||||||
vfs_path_t *vpath;
|
vfs_path_t *vpath;
|
||||||
char *ret_value;
|
char *ret_value;
|
||||||
|
|
||||||
vpath = vfs_path_from_str (filename);
|
ret_value = tilde_expand (filename);
|
||||||
|
vpath = vfs_path_from_str (ret_value);
|
||||||
|
g_free (ret_value);
|
||||||
ret_value = g_strdup (vfs_path_as_str (vpath));
|
ret_value = g_strdup (vfs_path_as_str (vpath));
|
||||||
vfs_path_free (vpath);
|
vfs_path_free (vpath);
|
||||||
return ret_value;
|
return ret_value;
|
||||||
|
Loading…
Reference in New Issue
Block a user