public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nikhil Mohite <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM-5119]: Hanging symlinks in a directory cause select file dialog to break.
Date: Wed, 3 Mar 2021 14:07:32 +0530
Message-ID: <CAOBg0AMzn_=HmkZexKfsZG=Q0vpSeZybaq1ur4hZUS7utL3+yA@mail.gmail.com> (raw)
Hi Hackers,
Please find the attached patch for RM-5119
<https://redmine.postgresql.org/issues/5119;: Hanging symlinks in a
directory cause select file dialog to break.
The issue was due to a broken symlink exception was occurring while reading
the file-related data.
--
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*
Attachments:
[application/octet-stream] RM-5119.patch (1.1K, 3-RM-5119.patch)
download | inline diff:
diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py
index 9801b7c3..6a98d4bc 100644
--- a/web/pgadmin/misc/file_manager/__init__.py
+++ b/web/pgadmin/misc/file_manager/__init__.py
@@ -603,11 +603,13 @@ class Filemanager(object):
# continue if file/folder is hidden (based on user preference)
if not show_hidden_files and is_folder_hidden(system_path):
continue
-
- user_path = os.path.join(os.path.join(user_dir, f))
- created = time.ctime(os.path.getctime(system_path))
- modified = time.ctime(os.path.getmtime(system_path))
- file_extension = str(splitext(system_path))
+ try:
+ user_path = os.path.join(os.path.join(user_dir, f))
+ created = time.ctime(os.path.getctime(system_path))
+ modified = time.ctime(os.path.getmtime(system_path))
+ file_extension = str(splitext(system_path))
+ except Exception as e:
+ continue
# set protected to 1 if no write or read permission
protected = 0
view thread (2+ 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]
Subject: Re: [pgAdmin][RM-5119]: Hanging symlinks in a directory cause select file dialog to break.
In-Reply-To: <CAOBg0AMzn_=HmkZexKfsZG=Q0vpSeZybaq1ur4hZUS7utL3+yA@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