Mercurial > libervia-backend
comparison sat/memory/memory.py @ 3932:7af29260ecb8
core: fix and renamed getLocalPath -> get_local_path:
- renaming is following global methods renaming to use snake_case
- for reasons lost in the mists of time, a `profile` argument was used while checking if
`client` is set is enough, and `client.profile` was escaped but actually not used in the
path.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 10 Oct 2022 15:23:59 +0200 |
parents | 580df5b557be |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3931:6c5f0fbc519b | 3932:7af29260ecb8 |
---|---|
1826 raise exceptions.NotFound("Can't find the file with id {file_id}".format( | 1826 raise exceptions.NotFound("Can't find the file with id {file_id}".format( |
1827 file_id=file_id)) | 1827 file_id=file_id)) |
1828 file_data = files_data[0] | 1828 file_data = files_data[0] |
1829 if file_data["type"] != C.FILE_TYPE_DIRECTORY and recursive: | 1829 if file_data["type"] != C.FILE_TYPE_DIRECTORY and recursive: |
1830 raise ValueError("recursive can only be set for directories") | 1830 raise ValueError("recursive can only be set for directories") |
1831 files_path = self.host.getLocalPath(None, C.FILES_DIR, profile=False) | 1831 files_path = self.host.get_local_path(None, C.FILES_DIR) |
1832 await self._deleteFile(client, peer_jid, recursive, files_path, file_data) | 1832 await self._deleteFile(client, peer_jid, recursive, files_path, file_data) |
1833 | 1833 |
1834 ## Cache ## | 1834 ## Cache ## |
1835 | 1835 |
1836 def getCachePath(self, namespace: str, *args: str) -> Path: | 1836 def getCachePath(self, namespace: str, *args: str) -> Path: |