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

This commit is contained in:
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

@@ -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