From: | Neel Patel <neel(dot)patel(at)enterprisedb(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: [pgAdmin4]: RM-1910 - Remember last used directory in the file manager |
Date: | 2016-12-16 12:08:10 |
Message-ID: | CACCA4P3BfyRVZpweuON=Gg7EyzPGt_xRJgjarWpYRzCBFVKmFA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Dave,
Please find attached patch file with the fix of below suggestion.
- If the directory that has been remembered no longer exists, then find
closest parent directory to set last remembered directory.
Do review it and let us know for comments.
Thanks,
Neel Patel
On Fri, Dec 9, 2016 at 5:54 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Hi
>
> On Fri, Dec 9, 2016 at 10:23 AM, Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
> wrote:
> > Hi,
> >
> > Please find attached patch file which contains the fix of last used
> > directory in file manager.
> > Now file manager will remember last used directory per user basis and
> will
> > be store in SQLite database.
> >
> > Do review it and let us know for comments.
>
> To avoid an exception, I had to change the hunk at line 578 of
> file_manager/__init__.py to check for self.dir == None, e.g.
>
> dir = self.dir if self.dir is not None else ''
> if not dir.endswith('/'):
> dir += '/';
>
> However, I then ran into a problem that if the directory that has been
> remembered no longer exists, I get an error message. I believe it
> should traverse back up the path to find the closest directory that is
> still present.
>
> Can you look at that please?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachment | Content-Type | Size |
---|---|---|
RM_1910_v2.patch | application/octet-stream | 7.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2016-12-16 12:46:35 | Re: [pgAdmin4][Patch]: RM #1807 Query Tool Does Not Recognize When File Changes Have Been Saved |
Previous Message | Khushboo Vashi | 2016-12-16 12:02:46 | Re: [pgAdmin4][Patch]: RM #1801 : Properly handle databases with datallowconn == false |