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.
This commit is contained in:
parent
0cd676115c
commit
f160577a65
1 changed files with 23 additions and 25 deletions
|
|
@ -322,8 +322,8 @@ class FileSharingSite(server.Site):
|
|||
|
||||
def __init__(self, file_sharing):
|
||||
self.file_sharing = file_sharing
|
||||
self.file_tmp_dir = file_sharing.host.getLocalPath(
|
||||
None, C.FILES_TMP_DIR, TMP_BUFFER_DIR, component=True, profile=False
|
||||
self.file_tmp_dir = file_sharing.host.get_local_path(
|
||||
None, C.FILES_TMP_DIR, TMP_BUFFER_DIR, component=True
|
||||
)
|
||||
for old_file in self.file_tmp_dir.iterdir():
|
||||
log.debug(f"purging old buffer file at {old_file}")
|
||||
|
|
@ -369,7 +369,7 @@ class FileSharing:
|
|||
self.host.trigger.add(
|
||||
"XEP-0329_parseResult_directory",
|
||||
self._getDirectoryMetadataElts)
|
||||
self.files_path = self.host.getLocalPath(None, C.FILES_DIR, profile=False)
|
||||
self.files_path = self.host.get_local_path(None, C.FILES_DIR)
|
||||
self.http_port = int(self.host.memory.getConfig(
|
||||
'component file-sharing', 'http_upload_port', 8888))
|
||||
connection_type = self.host.memory.getConfig(
|
||||
|
|
@ -532,8 +532,8 @@ class FileSharing:
|
|||
file_size=utils.getHumanSize(file_data['size'])
|
||||
)
|
||||
)
|
||||
file_tmp_dir = self.host.getLocalPath(
|
||||
None, C.FILES_TMP_DIR, peer_jid.userhost(), component=True, profile=False
|
||||
file_tmp_dir = self.host.get_local_path(
|
||||
None, C.FILES_TMP_DIR, peer_jid.userhost(), component=True
|
||||
)
|
||||
file_tmp_path = file_data['file_path'] = files_utils.get_unique_name(
|
||||
file_tmp_dir/filename)
|
||||
|
|
|
|||
Loading…
Reference in a new issue