mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-23 00:06:18 -04:00
Fix file name display if no file extension is present
This commit is contained in:
parent
a39d8cdc84
commit
547038c9bc
1 changed files with 3 additions and 1 deletions
|
@ -873,7 +873,9 @@ class ReceiveDialog extends Dialog {
|
|||
|
||||
const fileName = files[0].name;
|
||||
const fileNameSplit = fileName.split('.');
|
||||
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1];
|
||||
const fileExtension = fileNameSplit.length > 1
|
||||
? '.' + fileNameSplit[fileNameSplit.length - 1]
|
||||
: '';
|
||||
this.$fileStem.innerText = fileName.substring(0, fileName.length - fileExtension.length);
|
||||
this.$fileExtension.innerText = fileExtension;
|
||||
this.$fileSize.innerText = this._formatFileSize(totalSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue