mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* main.c (directory_history_add): Don't change the directory
passed as the argument, work on a copy.
This commit is contained in:
parent
0a6c496e40
commit
12f4a6665a
@ -1,3 +1,8 @@
|
||||
2003-05-05 Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
|
||||
|
||||
* main.c (directory_history_add): Don't change the directory
|
||||
passed as the argument, work on a copy.
|
||||
|
||||
2003-04-16 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* find.c (get_line_at): Strip trailing newline to fix $
|
||||
|
10
src/main.c
10
src/main.c
@ -687,14 +687,14 @@ subshell_chdir (char *directory)
|
||||
}
|
||||
|
||||
void
|
||||
directory_history_add (struct WPanel *panel, char *s)
|
||||
directory_history_add (struct WPanel *panel, const char *dir)
|
||||
{
|
||||
char *text;
|
||||
char *tmp;
|
||||
|
||||
text = g_strdup (s);
|
||||
strip_password (s, 1);
|
||||
tmp = g_strdup (dir);
|
||||
strip_password (tmp, 1);
|
||||
|
||||
panel->dir_history = list_append_unique (panel->dir_history, text);
|
||||
panel->dir_history = list_append_unique (panel->dir_history, tmp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -168,7 +168,7 @@ void init_menu (void);
|
||||
#endif /* !NATIVE_WIN32 */
|
||||
|
||||
struct WPanel;
|
||||
void directory_history_add (struct WPanel *panel, char *s);
|
||||
void directory_history_add (struct WPanel *panel, const char *dir);
|
||||
int do_panel_cd (struct WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
||||
|
||||
#endif /* !__MAIN_H */
|
||||
|
Loading…
Reference in New Issue
Block a user