Ticket #2693: patch
File patch, 878 bytes (added by ForeverYoung, 11 years ago) |
---|
-
panel.c
old new 2699 2699 chdir_to_readlink (WPanel * panel) 2700 2700 { 2701 2701 vfs_path_t *new_dir_vpath; 2702 char buffer[MC_MAXPATHLEN], *p ;2702 char buffer[MC_MAXPATHLEN], *p, fname[MC_MAXPATHLEN]; 2703 2703 int i; 2704 2704 struct stat st; 2705 2705 vfs_path_t *panel_fname_vpath; … … 2722 2722 return; 2723 2723 2724 2724 buffer[i] = 0; 2725 fname[0] = 0; 2725 2726 if (!S_ISDIR (st.st_mode)) 2726 2727 { 2727 2728 p = strrchr (buffer, PATH_SEP); … … 2732 2733 } 2733 2734 if (!p) 2734 2735 return; 2736 strcpy(fname, p + 1); 2735 2737 p[1] = 0; 2736 2738 } 2737 2739 if (*buffer == PATH_SEP) … … 2741 2743 2742 2744 change_panel (); 2743 2745 do_cd (new_dir_vpath, cd_exact); 2746 if (fname[0]) 2747 try_to_select(current_panel, fname); 2744 2748 vfs_path_free (new_dir_vpath); 2745 2749 change_panel (); 2746 2750