File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,11 @@ impl State {
3636 fn switch_session_with_cwd ( & self , dir : & Path ) -> Result < ( ) , String > {
3737 let session_name = dir. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
3838 let cwd = dir. to_path_buf ( ) ;
39- let layout_path = dir. to_str ( ) . unwrap ( ) . to_string ( ) + "/layout.kdl" ;
40- let host_layout_path = ROOT . to_string ( ) + layout_path. as_str ( ) ;
41- let layout = if PathBuf :: from ( host_layout_path. clone ( ) ) . exists ( ) {
42- LayoutInfo :: File ( host_layout_path)
39+ let host_layout_path = PathBuf :: from ( ROOT )
40+ . join ( dir. strip_prefix ( "/" ) . unwrap ( ) )
41+ . join ( "layout.kdl" ) ;
42+ let layout = if host_layout_path. exists ( ) {
43+ LayoutInfo :: File ( host_layout_path. to_str ( ) . unwrap ( ) . into ( ) )
4344 } else {
4445 self . config . layout . clone ( )
4546 } ;
You can’t perform that action at this time.
0 commit comments