Skip to content

Commit

Permalink
fixed #6544. Add Folder issue for adding a sub-folder inside a folder.
Browse files Browse the repository at this point in the history
Issue root cause is "/" omitted while `file_path` is making from `path` and `name`.
Fixed the issue of sub-folder adding issue by adding a process to check "/" is end of the `path` or start of the `name`.
  • Loading branch information
sanlinnaing committed Jul 9, 2023
1 parent 70d356d commit 441b4b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/pgadmin/misc/file_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,8 @@ def get_new_name(in_dir, path, name):
new_name = name
count = 0
while True:
if not (path.endswith("/") or name.startswith("/")):
path = path + "/"
file_path = "{}{}/".format(path, new_name)
create_path = file_path
if in_dir != "":
Expand Down

0 comments on commit 441b4b4

Please sign in to comment.