mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-24 18:45:52 +03:00
Make things be absolute paths again
This commit is contained in:
parent
9732ec6797
commit
ae5d18617a
1 changed files with 7 additions and 7 deletions
|
@ -172,12 +172,12 @@ class MediaFilePaths(object):
|
||||||
|
|
||||||
if NEW_FORMAT_ID_RE.match(media_id):
|
if NEW_FORMAT_ID_RE.match(media_id):
|
||||||
return os.path.join(
|
return os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[:10], media_id[11:],
|
media_id[:10], media_id[11:],
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return os.path.join(
|
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:],
|
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):
|
if NEW_FORMAT_ID_RE.match(media_id):
|
||||||
return [
|
return [
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[:10], media_id[11:],
|
media_id[:10], media_id[11:],
|
||||||
),
|
),
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[:10],
|
media_id[:10],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
return [
|
return [
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[0:2], media_id[2:4], media_id[4:],
|
media_id[0:2], media_id[2:4], media_id[4:],
|
||||||
),
|
),
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[0:2], media_id[2:4],
|
media_id[0:2], media_id[2:4],
|
||||||
),
|
),
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"url_cache_thumbnails",
|
self.primary_base_path, "url_cache_thumbnails",
|
||||||
media_id[0:2],
|
media_id[0:2],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue