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:
Hans-Christoph Steiner 2017-09-19 10:57:29 +02:00
parent 6adf309bef
commit 176f539647
3 changed files with 16 additions and 16 deletions

View file

@ -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)