File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/vs/workbench/services/dialogs/browser Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -994,9 +994,22 @@ export class SimpleFileDialog implements ISimpleFileDialog {
994
994
return sorted ;
995
995
}
996
996
997
+ private extname ( file : URI ) : string {
998
+ const ext = resources . extname ( file ) ;
999
+ if ( ext . length === 0 ) {
1000
+ const basename = resources . basename ( file ) ;
1001
+ if ( basename . startsWith ( '.' ) ) {
1002
+ return basename ;
1003
+ }
1004
+ } else {
1005
+ return ext ;
1006
+ }
1007
+ return '' ;
1008
+ }
1009
+
997
1010
private filterFile ( file : URI ) : boolean {
998
1011
if ( this . options . filters ) {
999
- const ext = resources . extname ( file ) ;
1012
+ const ext = this . extname ( file ) ;
1000
1013
for ( let i = 0 ; i < this . options . filters . length ; i ++ ) {
1001
1014
for ( let j = 0 ; j < this . options . filters [ i ] . extensions . length ; j ++ ) {
1002
1015
const testExt = this . options . filters [ i ] . extensions [ j ] ;
You can’t perform that action at this time.
0 commit comments