@@ -42,7 +42,7 @@ const extensionMap = {
42
42
"mp4" : { style : FA_STYLE_REGULAR , icon : "file-video" , type : "bin" } ,
43
43
"mpy" : { style : FA_STYLE_REGULAR , icon : "file" , type : "bin" } ,
44
44
"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" } ,
46
46
"toml" : { style : FA_STYLE_REGULAR , icon : "file-lines" , type : "text" } ,
47
47
"txt" : { style : FA_STYLE_REGULAR , icon : "file-lines" , type : "text" } ,
48
48
"wav" : { style : FA_STYLE_REGULAR , icon : "file-audio" , type : "bin" } ,
@@ -57,6 +57,9 @@ const FILESIZE_UNITS = ["bytes", "KB", "MB", "GB", "TB"];
57
57
const COMPACT_UNITS = [ "" , "K" , "M" , "G" , "T" ] ;
58
58
59
59
function getFileExtension ( filename ) {
60
+ if ( filename === null ) {
61
+ return null ;
62
+ }
60
63
let extension = filename . split ( '.' ) . pop ( ) ;
61
64
if ( extension !== null ) {
62
65
return String ( extension ) . toLowerCase ( ) ;
@@ -189,7 +192,7 @@ class FileDialog extends GenericModal {
189
192
this . _currentPath = path ;
190
193
}
191
194
const currentPathLabel = this . _getElement ( 'currentPathLabel' ) ;
192
- currentPathLabel . innerHTML = this . _currentPath ;
195
+ currentPathLabel . innerHTML = `<i class=" ${ FA_STYLE_REGULAR } fa-folder-open"></i> ` + this . _currentPath ;
193
196
194
197
if ( this . _currentPath != "/" ) {
195
198
this . _addFile ( { path : ".." , isDir : true } , "fa-folder-open" ) ;
0 commit comments