diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py index db5f0b6d4..d132e46eb 100644 --- a/web/pgadmin/misc/file_manager/__init__.py +++ b/web/pgadmin/misc/file_manager/__init__.py @@ -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