File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -436,9 +436,8 @@ class FileDialog extends GenericModal {
436
436
}
437
437
438
438
for ( let filename of filenames ) {
439
- await this . _showBusy ( this . _fileHelper . delete ( filename ) ) ;
440
439
// Delete the item
441
- await this . _showBusy ( this . _fileHelper . delete ( this . _currentPath + filename ) ) ;
440
+ await this . _showBusy ( this . _fileHelper . delete ( filename ) ) ;
442
441
}
443
442
444
443
// Refresh the file list
@@ -641,6 +640,10 @@ class FileDialog extends GenericModal {
641
640
if ( ! this . _canPerformWritableFileOperation ( ) ) return ;
642
641
643
642
let oldName = this . _getSelectedFilenames ( ) ;
643
+ if ( oldName . length != 1 ) {
644
+ return ;
645
+ }
646
+ oldName = oldName [ 0 ] ;
644
647
let newName = prompt ( "Enter a new folder name" , oldName ) ;
645
648
// If cancelled, do nothing
646
649
if ( ! newName ) {
@@ -763,13 +766,10 @@ class FileDialog extends GenericModal {
763
766
let filetype , filename ;
764
767
let selectedItem = this . _getSelectedFiles ( ) ;
765
768
if ( selectedItem . length > 1 ) {
769
+ // We don't currently support opening multiple items
766
770
return ;
767
771
}
768
- if ( selectedItem . length == 1 ) {
769
- selectedItem = selectedItem [ 0 ] ;
770
- } else {
771
- selectedItem = null ;
772
- }
772
+ selectedItem = selectedItem . length == 1 ? selectedItem [ 0 ] : null ;
773
773
774
774
if ( item !== undefined ) {
775
775
filetype = item . getAttribute ( "data-type" ) ;
You can’t perform that action at this time.
0 commit comments