Fixed an issue when uploading a CSV throwing an error in the Desktop mode. Fixes #7150

pull/71/head
Rahul Shirsat 2022-02-04 15:10:13 +05:30 committed by Akshay Joshi
parent 4a195e7ef6
commit 444a364a8d
2 changed files with 3 additions and 1 deletions

View File

@ -35,4 +35,5 @@ Bug fixes
| `Issue #7142 <https://redmine.postgresql.org/issues/7142>`_ - Fixed an issue where a warning message was shown after database creation/modification.
| `Issue #7145 <https://redmine.postgresql.org/issues/7145>`_ - Ensure that owner should be ignored while comparing extensions.
| `Issue #7146 <https://redmine.postgresql.org/issues/7146>`_ - Fixed event trigger comparing issue in Schema Diff tool.
| `Issue #7150 <https://redmine.postgresql.org/issues/7150>`_ - Fixed an issue when uploading a CSV throwing an error in the Desktop mode.
| `Issue #7151 <https://redmine.postgresql.org/issues/7151>`_ - Fixed value error in the restore dialog.

View File

@ -984,7 +984,8 @@ class Filemanager(object):
try:
# Check if the new file is inside the users directory
pathlib.Path(new_name).relative_to(the_dir)
if config.SERVER_MODE:
pathlib.Path(new_name).relative_to(the_dir)
except ValueError:
return self.ERROR_NOT_ALLOWED