mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
remove url-unsafe characters from "current version" symlink names
This prevents the URL from having ugly %20 stuff in the app name.
This commit is contained in:
parent
803ec39e23
commit
b33cae375a
1 changed files with 3 additions and 1 deletions
|
|
@ -868,7 +868,9 @@ def make_index(apps, sortedids, apks, repodir, archive, categories):
|
||||||
if current_version_file is not None \
|
if current_version_file is not None \
|
||||||
and config['make_current_version_link'] \
|
and config['make_current_version_link'] \
|
||||||
and repodir == 'repo': # only create these
|
and repodir == 'repo': # only create these
|
||||||
apklinkname = app[config['current_version_name_source']] + '.apk'
|
sanitized_name = re.sub('''[ '"&%?+=]''', '',
|
||||||
|
app[config['current_version_name_source']])
|
||||||
|
apklinkname = sanitized_name + '.apk'
|
||||||
current_version_path = os.path.join(repodir, current_version_file)
|
current_version_path = os.path.join(repodir, current_version_file)
|
||||||
if os.path.exists(apklinkname):
|
if os.path.exists(apklinkname):
|
||||||
os.remove(apklinkname)
|
os.remove(apklinkname)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue