Ticket #2693: patch

File patch, 878 bytes (added by ForeverYoung, 10 years ago)

patch

  • panel.c

    old new  
    26992699chdir_to_readlink (WPanel * panel) 
    27002700{ 
    27012701    vfs_path_t *new_dir_vpath; 
    2702     char buffer[MC_MAXPATHLEN], *p; 
     2702    char buffer[MC_MAXPATHLEN], *p, fname[MC_MAXPATHLEN]; 
    27032703    int i; 
    27042704    struct stat st; 
    27052705    vfs_path_t *panel_fname_vpath; 
     
    27222722        return; 
    27232723 
    27242724    buffer[i] = 0; 
     2725    fname[0] = 0; 
    27252726    if (!S_ISDIR (st.st_mode)) 
    27262727    { 
    27272728        p = strrchr (buffer, PATH_SEP); 
     
    27322733        } 
    27332734        if (!p) 
    27342735            return; 
     2736        strcpy(fname, p + 1); 
    27352737        p[1] = 0; 
    27362738    } 
    27372739    if (*buffer == PATH_SEP) 
     
    27412743 
    27422744    change_panel (); 
    27432745    do_cd (new_dir_vpath, cd_exact); 
     2746    if (fname[0]) 
     2747        try_to_select(current_panel, fname); 
    27442748    vfs_path_free (new_dir_vpath); 
    27452749    change_panel (); 
    27462750