mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Fixed user defined home dir, if home dir contain tilda (~/)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
44de4d1b1f
commit
1dffc24f9b
@ -141,8 +141,9 @@ incomplete, use `configure --help' to get the full list):
|
|||||||
`--with-homedir'
|
`--with-homedir'
|
||||||
This option allow users to place user config directories in any
|
This option allow users to place user config directories in any
|
||||||
place. By default value is 'XDG', this mean, mc will respect XDG
|
place. By default value is 'XDG', this mean, mc will respect XDG
|
||||||
standards. If other value will specified, this will used as directory
|
standards. If other value is specified, this will used as directory
|
||||||
name (relative to $HOME).
|
name (relative to $HOME if path is relative, or as is if path is
|
||||||
|
absolute).
|
||||||
|
|
||||||
VFS options:
|
VFS options:
|
||||||
- - - - - -
|
- - - - - -
|
||||||
|
@ -301,11 +301,17 @@ mc_config_init_config_paths (GError ** error)
|
|||||||
|
|
||||||
mc_config_fix_migrated_rules ();
|
mc_config_fix_migrated_rules ();
|
||||||
#else /* MC_HOMEDIR_XDG */
|
#else /* MC_HOMEDIR_XDG */
|
||||||
char *u_config_dir = g_build_filename (mc_config_get_home_dir (), MC_USERCONF_DIR, NULL);
|
char *defined_userconf_dir;
|
||||||
|
char *u_config_dir;
|
||||||
|
|
||||||
u_config_dir = (u_config_dir == NULL)
|
defined_userconf_dir = tilde_expand (MC_USERCONF_DIR);
|
||||||
? g_build_filename (mc_config_get_home_dir (), MC_OLD_USERCONF_DIR,
|
if (!g_path_is_absolute (defined_userconf_dir))
|
||||||
NULL) : g_strdup (u_config_dir);
|
{
|
||||||
|
u_config_dir = g_build_filename (mc_config_get_home_dir (), MC_USERCONF_DIR, NULL);
|
||||||
|
g_free (defined_userconf_dir);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
u_config_dir = defined_userconf_dir;
|
||||||
|
|
||||||
mc_data_str = mc_cache_str = mc_config_str =
|
mc_data_str = mc_cache_str = mc_config_str =
|
||||||
mc_config_init_one_config_path (u_config_dir, "", error);
|
mc_config_init_one_config_path (u_config_dir, "", error);
|
||||||
|
@ -1593,7 +1593,7 @@ load_hotlist (void)
|
|||||||
else
|
else
|
||||||
message (D_ERROR, _("Hotlist Load"),
|
message (D_ERROR, _("Hotlist Load"),
|
||||||
_
|
_
|
||||||
("MC was unable to write ~/%s file,\nyour old hotlist entries were not deleted"),
|
("MC was unable to write %s file,\nyour old hotlist entries were not deleted"),
|
||||||
MC_USERCONF_DIR PATH_SEP_STR MC_HOTLIST_FILE);
|
MC_USERCONF_DIR PATH_SEP_STR MC_HOTLIST_FILE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user