RM4069 - Append the file suffix to filenames when needed in the File Create dialogue.

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: RM4069 - Append the file suffix to filenames when needed in the File Create dialogue.
Date: 2019-03-14 11:31:24
Message-ID: CA+OCxowwV0_8jJ_PBkW6w-oUBPfKy-_pnPd+qyZZ3c2WgStVXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Here's a small patch for $SUBJECT.

I'd normally commit something like this directly but wanted some thoughts
on the fact that it introduces a third method for figuring out what path
separator to use to the file manager code:

1) We get it from the config file (which is actually a template)
2) We look at what's already in an existing path

and now:

3) We use navigator.platform

I could use method 1 here, but it would add quite a bit more code (unless
there's a simple way of importing the config object from utility.js that is
beyond my limited JS-fu).

Method 2 can't be used as there may not be a path to look at.

Any thoughts on this issue, and tidying up 1 & 2 in general?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
RM_4069.diff application/octet-stream 2.4 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2019-03-14 11:46:19 Re: [pgAdmin4][Patch] - RM #4019 - Update all JS and Python dependencies to the latest releases
Previous Message Khushboo Vashi 2019-03-14 05:28:40 Re: [pgAdmin4][Patch] - RM #4019 - Update all JS and Python dependencies to the latest releases