@@ -42,7 +42,7 @@ const extensionMap = {
4242 "mp4" : { style : FA_STYLE_REGULAR , icon : "file-video" , type : "bin" } ,
4343 "mpy" : { style : FA_STYLE_REGULAR , icon : "file" , type : "bin" } ,
4444 "pdf" : { style : FA_STYLE_REGULAR , icon : "file-pdf" , type : "bin" } ,
45- "py" : { style : FA_STYLE_REGULAR , icon : "file-lines " , type : "text" } ,
45+ "py" : { style : FA_STYLE_REGULAR , icon : "file-code " , type : "text" } ,
4646 "toml" : { style : FA_STYLE_REGULAR , icon : "file-lines" , type : "text" } ,
4747 "txt" : { style : FA_STYLE_REGULAR , icon : "file-lines" , type : "text" } ,
4848 "wav" : { style : FA_STYLE_REGULAR , icon : "file-audio" , type : "bin" } ,
@@ -57,6 +57,9 @@ const FILESIZE_UNITS = ["bytes", "KB", "MB", "GB", "TB"];
5757const COMPACT_UNITS = [ "" , "K" , "M" , "G" , "T" ] ;
5858
5959function getFileExtension ( filename ) {
60+ if ( filename === null ) {
61+ return null ;
62+ }
6063 let extension = filename . split ( '.' ) . pop ( ) ;
6164 if ( extension !== null ) {
6265 return String ( extension ) . toLowerCase ( ) ;
@@ -189,7 +192,7 @@ class FileDialog extends GenericModal {
189192 this . _currentPath = path ;
190193 }
191194 const currentPathLabel = this . _getElement ( 'currentPathLabel' ) ;
192- currentPathLabel . innerHTML = this . _currentPath ;
195+ currentPathLabel . innerHTML = `<i class=" ${ FA_STYLE_REGULAR } fa-folder-open"></i> ` + this . _currentPath ;
193196
194197 if ( this . _currentPath != "/" ) {
195198 this . _addFile ( { path : ".." , isDir : true } , "fa-folder-open" ) ;
0 commit comments