Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ImportHandler: importing files with unknown extension work again when…
… allowUnknownFileEnds is true By specification, when settings.allowUnknownFileEnds is true and the user tries to import a file with an unknown extension (this includes no extension), Etherpad tries to import it as txt. This broke in Etherpad 1.8.0, that abruptly terminates the processing with an UnhandledPromiseRejectionWarning. This patch restores the intended behaviour, and allows to import as text a file with an unknown extension (on no extension). In order to catch the UnhandledPromiseRejectionWarning we had to use fsp_rename(), which is declared earlier in the code and is promised based instead of fs.rename(), which is callback based. Fixes #3710.
- Loading branch information