diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-13 11:35:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-13 11:35:44 +0100 |
commit | ae5d18617afd98bb5d51b43c2a12a99e9d96da39 (patch) | |
tree | 182f189d03338a5127f6a6e129735dd22dc8fffc /synapse | |
parent | s/write_to_file/write_to_file_and_backup/ (diff) | |
download | synapse-ae5d18617afd98bb5d51b43c2a12a99e9d96da39.tar.xz |
Make things be absolute paths again
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/media/v1/filepath.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/rest/media/v1/filepath.py b/synapse/rest/media/v1/filepath.py index 6923a3fbd3..a3a15ac302 100644 --- a/synapse/rest/media/v1/filepath.py +++ b/synapse/rest/media/v1/filepath.py @@ -172,12 +172,12 @@ class MediaFilePaths(object): if NEW_FORMAT_ID_RE.match(media_id): return os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[:10], media_id[11:], ) else: return os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[0:2], media_id[2:4], media_id[4:], ) @@ -188,26 +188,26 @@ class MediaFilePaths(object): if NEW_FORMAT_ID_RE.match(media_id): return [ os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[:10], media_id[11:], ), os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[:10], ), ] else: return [ os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[0:2], media_id[2:4], media_id[4:], ), os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[0:2], media_id[2:4], ), os.path.join( - "url_cache_thumbnails", + self.primary_base_path, "url_cache_thumbnails", media_id[0:2], ), ] |