mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
allow spaces in filenames
This fixes all the bugs I could find that prevented fdroid from handling files with spaces in them. This is more important now that fdroid supports random media files, and Repomaker
This commit is contained in:
parent
6adf309bef
commit
176f539647
3 changed files with 16 additions and 16 deletions
|
@ -1197,16 +1197,6 @@ def process_apk(apkcache, apkfilename, repodir, knownapks, use_date_from_apk=Fal
|
|||
apk is the scanned apk information, and cachechanged is True if the apkcache got changed.
|
||||
"""
|
||||
|
||||
if ' ' in apkfilename:
|
||||
if options.rename_apks:
|
||||
newfilename = apkfilename.replace(' ', '_')
|
||||
os.rename(os.path.join(repodir, apkfilename),
|
||||
os.path.join(repodir, newfilename))
|
||||
apkfilename = newfilename
|
||||
else:
|
||||
logging.critical("Spaces in filenames are not allowed.")
|
||||
return True, None, False
|
||||
|
||||
apk = {}
|
||||
apkfile = os.path.join(repodir, apkfilename)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue