Przeglądaj źródła

fix folder name suffix checking` (#2194)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
Kevin Hu 1 rok temu
rodzic
commit
b9c383612d
No account linked to committer's email address
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2
    1
      api/apps/file_app.py

+ 2
- 1
api/apps/file_app.py Wyświetl plik

@@ -296,7 +296,8 @@ def rename():
e, file = FileService.get_by_id(req["file_id"])
if not e:
return get_data_error_result(retmsg="File not found!")
if pathlib.Path(req["name"].lower()).suffix != pathlib.Path(
if file.type != FileType.FOLDER.value \
and pathlib.Path(req["name"].lower()).suffix != pathlib.Path(
file.name.lower()).suffix:
return get_json_result(
data=False,

Ładowanie…
Anuluj
Zapisz