Ticket #3684: 3684-use-fulle-paths-for-bash-and-dash-user-init_file.patch

File 3684-use-fulle-paths-for-bash-and-dash-user-init_file.patch, 678 bytes (added by alllexx88, 8 years ago)
  • src/subshell/common.c

    a b  
    279279        if (!exist_file (init_file)) 
    280280        { 
    281281            g_free (init_file); 
    282             init_file = g_strdup (".bashrc"); 
     282            init_file = g_strdup_printf ("%s/.bashrc", g_getenv ("HOME")); 
    283283        } 
    284284 
    285285        /* Make MC's special commands not show up in bash's history and also suppress 
     
    310310        if (!exist_file (init_file)) 
    311311        { 
    312312            g_free (init_file); 
    313             init_file = g_strdup (".profile"); 
     313            init_file = g_strdup_printf ("%s/.profile", g_getenv ("HOME")); 
    314314        } 
    315315 
    316316        /* Put init file to ENV variable used by ash */