public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM4855] Renaming a file removes the file extension
Date: Thu, 8 Oct 2020 18:33:45 +0530
Message-ID: <CAM9w-_nTDOJTEYmptU2-DRJMCa9w9_g02Z4sz18KORuktQ4vNw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdEd9bC3YmMZb8Q-D-zOhBysbNmRCxHsPckbTS4Q=Mjkw@mail.gmail.com>
References: <CAM9w-_=xWqbhhM2ZL1KZf1aQVmTDqpRLJfgzOt9gUfG6RzR3ng@mail.gmail.com>
	<CANxoLDdEd9bC3YmMZb8Q-D-zOhBysbNmRCxHsPckbTS4Q=Mjkw@mail.gmail.com>

Hi,

Attached patch will add the .sql when saving a file and and format -> sql
selected, no matter what the file name is.
Please review.

On Thu, Oct 8, 2020 at 6:27 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, patch applied.
>
> On Mon, Sep 28, 2020 at 6:08 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Attached is the patch to fix a bug where extension file extension is
>> stripped on renaming a file.
>> Pleasure review.
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
>> <http://edbpostgres.com;
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Sr. Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM4855.part2.patch (688B, 3-RM4855.part2.patch)
  download | inline diff:
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 268d8d727..8e53e85c6 100644
--- a/web/pgadmin/misc/file_manager/static/js/create_dialogue.js
+++ b/web/pgadmin/misc/file_manager/static/js/create_dialogue.js
@@ -157,9 +157,7 @@ module.exports =  Alertify.dialog('createModeDlg', function() {
           sep = '\\';
         }
 
-        if ((!newFile.includes('.') ||
-            newFile.split('.').pop().includes(sep)) &&
-            ext != '*') {
+        if (ext != '*') {
           newFile = newFile + '.' + ext;
           $('.storage_dialog #uploader .input-path').val(newFile);
         }


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin][RM4855] Renaming a file removes the file extension
  In-Reply-To: <CAM9w-_nTDOJTEYmptU2-DRJMCa9w9_g02Z4sz18KORuktQ4vNw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox