diff --git a/web/pgadmin/misc/file_manager/static/js/create_dialogue.js b/web/pgadmin/misc/file_manager/static/js/create_dialogue.js index c7e4b6b60..634742a0d 100644 --- a/web/pgadmin/misc/file_manager/static/js/create_dialogue.js +++ b/web/pgadmin/misc/file_manager/static/js/create_dialogue.js @@ -151,7 +151,9 @@ module.exports = Alertify.dialog('createModeDlg', function() { there is a . already but it's not following the last /, AND the extension isn't *, then we add the extension. */ - if (ext != '*') { + if ((!newFile.includes('.') || + newFile.split('.').pop() != ext) && + ext != '*') { newFile = newFile + '.' + ext; $('.storage_dialog #uploader .input-path').val(newFile); }