File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import {open as openPath} from '@tauri-apps/plugin-shell';
99import { open as showOpenDialog , save as showSaveDialog } from '@tauri-apps/plugin-dialog' ;
1010import { downloadDir } from "@tauri-apps/api/path" ;
1111import { CreateDirectoryMessageComponent } from "./create-directory-message/create-directory-message.component" ;
12+ import { trimEnd } from "lodash-es" ;
1213
1314class FilesState {
1415
@@ -140,7 +141,7 @@ export class FilesComponent implements OnInit, OnDestroy {
140141 if ( ! cwd ) return ;
141142 switch ( file . type ) {
142143 case 'd' : {
143- await this . cd ( `${ cwd } /${ file . filename } ` , true ) ;
144+ await this . cd ( `${ trimEnd ( cwd , '/' ) } /${ file . filename } ` , true ) ;
144145 break ;
145146 }
146147 case '-' : {
@@ -354,8 +355,8 @@ export class FilesComponent implements OnInit, OnDestroy {
354355 }
355356
356357 async breadcrumbNav ( segs : string [ ] ) : Promise < void > {
357- segs [ 0 ] = '' ;
358- await this . cd ( segs . join ( '/' ) , true ) ;
358+ segs = segs . filter ( s => ! ! s ) ;
359+ await this . cd ( '/' + segs . join ( '/' ) , true ) ;
359360 }
360361
361362}
You can’t perform that action at this time.
0 commit comments