mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-28 13:14:31 +03:00
(edit_set_filename): expand tilde while setting file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
8088fe9b66
commit
4c40d57508
@ -502,13 +502,15 @@ menu_save_mode_cmd (void)
|
||||
}
|
||||
|
||||
void
|
||||
edit_set_filename (WEdit * edit, const char *f)
|
||||
edit_set_filename (WEdit * edit, const char *name)
|
||||
{
|
||||
g_free (edit->filename);
|
||||
if (!f)
|
||||
f = "";
|
||||
edit->filename = g_strdup (f);
|
||||
if (edit->dir == NULL && !g_path_is_absolute (f))
|
||||
|
||||
if (name == NULL)
|
||||
name = "";
|
||||
|
||||
edit->filename = tilde_expand (name);
|
||||
if (edit->dir == NULL && !g_path_is_absolute (name))
|
||||
edit->dir = g_strdup (vfs_get_current_dir ());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user